Commit Graph

146 Commits

Author SHA1 Message Date
Matt Van Horn 4714dd1d4c
feat: add Groq provider example and README entry (#121)
Fixes #25
2026-04-17 12:15:45 +08:00
JackChen 6de7bbd41f
feat: add rule-based compact context strategy (#111) (#119)
* feat: add rule-based compact context strategy (#111)

Add `contextStrategy: 'compact'` as a zero-LLM-cost alternative to `summarize`.
Instead of making an LLM call to compress everything into prose, it selectively
compresses old turns using structural rules:

- Preserve tool_use blocks (agent decisions) and error tool_results
- Replace long tool_result content with compact markers including tool name
- Truncate long assistant text blocks with head excerpts
- Keep recent turns (configurable via preserveRecentTurns) fully intact
- Detect already-compressed markers from compressToolResults to avoid double-processing

Closes #111

* fix: remove redundant length guard and fix compact type indentation
2026-04-16 23:34:50 +08:00
JackChen 696269c924
fix: guard against re-compression of already compressed tool result markers (#118)
When minChars is set low, compressed markers could be re-compressed
with incorrect char counts. Skip blocks whose content already starts
with the compression prefix.
2026-04-16 18:25:48 +08:00
JackChen a6b5181c74
feat: post-consumption tool result compression (#116) (#117)
Replace consumed tool results with compact markers before each LLM call,
freeing context budget in multi-turn agent runs. A tool result is
"consumed" once the assistant has produced a response after seeing it.

- Add `compressToolResults` option to AgentConfig / RunnerOptions
- Runs before contextStrategy (lightweight, no LLM calls)
- Error results and short results (< minChars, default 500) are skipped
- 9 test cases covering default off, compression, parallel tools,
  4+ turn compounding, error exemption, custom threshold, and
  contextStrategy coexistence
2026-04-16 18:22:42 +08:00
JackChen c3ead26677
feat: add tool output auto-truncation (#110) (#115)
* feat: add tool output auto-truncation at framework level (#110)

Prevent context blowup from large tool outputs by adding opt-in
character-based truncation (head 70% + tail 30% with marker).
Agent-level `maxToolOutputChars` and per-tool `maxOutputChars`
with per-tool taking priority. Marker overhead is budgeted so
the result never exceeds the configured limit.

* fix: truncateToolOutput may exceed maxChars when limit < marker overhead

- Fall back to hard slice when maxChars is too small to fit the marker
- Fix misplaced JSDoc for outputSchema in AgentConfig
- Tighten test assertion to verify length <= maxChars
2026-04-16 17:40:08 +08:00
JackChen d78af2787f
Merge pull request #114 from hkalex/feature/llm-deepseek
LGTM -- clean DeepSeek adapter following the established pattern, tests and docs updated.
2026-04-16 14:15:20 +08:00
hkalex cd57c2ee31 DeepSeek - Fixed adapter test URL 2026-04-16 15:24:16 +10:00
hkalex b6ee63bda0 Updated the DeepSeek provider help text 2026-04-16 15:21:50 +10:00
JackChen 1e154b22fd
Merge pull request #113 from hkalex/feature/llm-minimax
LGTM — clean MiniMax adapter following the established Grok pattern, good test coverage, docs updated.
2026-04-16 12:00:32 +08:00
hkalex 0485bfb82f Change the default URL of deepseek. Change the example to use reasoner for architect. 2026-04-16 12:17:22 +10:00
hkalex fa4533e8d0 Support DeepSeek 2026-04-16 11:36:03 +10:00
hkalex 5305cb2321 Support MiniMax 2026-04-16 11:06:37 +10:00
JackChen 34b911825a docs: update examples section with Vercel AI SDK demo and fix count
- Add with-vercel-ai-sdk to recommended examples list in both READMEs
- EN: 16 scripts -> 16 scripts + 1 full-stack demo
- ZH: fix count from 15 to 16, add full-stack demo
2026-04-16 01:48:28 +08:00
JackChen 1cc43eba6e
Merge pull request #112 from JackChen-me/feat/custom-tools
feat: add Vercel AI SDK integration example
2026-04-16 01:26:53 +08:00
JackChen 8ecfc1504c feat: add Vercel AI SDK integration example (Next.js + runTeam)
Next.js App Router demo showing OMA + Vercel AI SDK working together:
- Backend: OMA runTeam() orchestrates researcher + writer agents
- Frontend: AI SDK useChat hook for streaming chat UI
- Uses DeepSeek via OpenAI-compatible provider
2026-04-16 00:49:49 +08:00
JackChen 0170e43c4e
feat: add customTools to AgentConfig (#109)
* feat: add customTools support to AgentConfig for orchestrator-level tool injection

Users can now pass custom ToolDefinition objects via AgentConfig.customTools,
which are registered alongside built-in tools in all orchestrator paths
(runAgent, runTeam, runTasks). Custom tools bypass allowlist/preset filtering
but can still be blocked by disallowedTools.

Ref #108

* test: add disallowedTools blocking custom tool test

* fix: apply disallowedTools filtering to runtime-added custom tools

Previously runtime-added tools bypassed all filtering including
disallowedTools, contradicting the documented behavior. Now custom
tools still bypass preset/allowlist but respect the denylist.
2026-04-15 15:14:19 +08:00
JackChen 93795db09f fix: apply disallowedTools filtering to runtime-added custom tools
Previously runtime-added tools bypassed all filtering including
disallowedTools, contradicting the documented behavior. Now custom
tools still bypass preset/allowlist but respect the denylist.
2026-04-15 15:11:12 +08:00
JackChen 9b487ca368 test: add disallowedTools blocking custom tool test 2026-04-15 15:10:02 +08:00
JackChen 38a88df144 feat: add customTools support to AgentConfig for orchestrator-level tool injection
Users can now pass custom ToolDefinition objects via AgentConfig.customTools,
which are registered alongside built-in tools in all orchestrator paths
(runAgent, runTeam, runTasks). Custom tools bypass allowlist/preset filtering
but can still be blocked by disallowedTools.

Ref #108
2026-04-15 14:45:09 +08:00
JackChen 017e0f42f6 docs: update README to reflect recent changes (glob tool, MCP shipped, source file count) 2026-04-14 21:30:30 +08:00
JackChen c0ddcfc7aa
Merge pull request #107 from ibrahimkzmv/feat.add-cli
feat: add CLI
2026-04-13 03:25:57 +08:00
Ibrahim Kazimov cdec60e7ad docs: add docs for cli 2026-04-12 20:17:13 +03:00
Ibrahim Kazimov dfe46721a5 feat: add cli 2026-04-12 20:12:16 +03:00
JackChen 0f16e81ae6
Merge pull request #105 from JackChen-me/chore/feature-request-source-field
chore: add source field to feature request template
2026-04-12 23:25:51 +08:00
JackChen 5804a54898 chore: add source field to feature request issue template
Helps maintainers triage by requiring contributors to indicate where
the idea originated (real use case, competitive reference, systematic
gap, or external discussion).
2026-04-12 23:23:42 +08:00
JackChen 252419e1f8
Merge pull request #104 from JackChen-me/fix/issue-99-100-101-abort-signal-propagation
fix: propagate AbortSignal through tools, Gemini adapter, and abort queue path
2026-04-12 23:22:15 +08:00
JackChen 6ea66afab5 fix: propagate AbortSignal through tool execution, Gemini adapter, and abort queue path (#99, #100, #101)
- #99: pass per-call effectiveAbortSignal to buildToolContext() so tools
  receive the correct signal instead of the static runner-level one
- #100: replace manual pending-task loop with queue.skipRemaining() on
  abort, fixing blocked tasks left non-terminal and missing events
- #101: forward abortSignal in Gemini adapter's buildConfig() so the
  SDK can cancel in-flight API calls
- Add 8 targeted tests for all three fixes
2026-04-12 23:20:30 +08:00
JackChen 97c5e457dd
Merge pull request #103 from JackChen-me/fix/issue-98-run-error-propagation
fix: propagate error events in AgentRunner.run()
2026-04-12 22:22:22 +08:00
JackChen 9b04fbf2e5
Merge pull request #102 from ibrahimkzmv/feat.add-glob-tool
feat: add glob tool
2026-04-12 22:21:43 +08:00
JackChen 9a446b8796 fix: propagate error events in AgentRunner.run() (#98)
run() only handled 'done' events from stream(), silently dropping
'error' events. This caused failed LLM calls to return an empty
RunResult that the caller treated as successful.
2026-04-12 22:16:33 +08:00
Ibrahim Kazimov dc88232885 feat: add glob tool 2026-04-12 16:59:20 +03:00
JackChen ced1d90a93
Merge pull request #89 from ibrahimkzmv/feat.mcp-tool-integration
feat: add connectMCPTools() to register MCP server tools as standard agent tools
2026-04-12 17:05:31 +08:00
JackChen 0fb8a38284
Merge pull request #88 from ibrahimkzmv/feat.context-strategy
feat: Add contextStrategy to control conversation growth and prevent token explosion in agent runs
2026-04-12 16:54:41 +08:00
MrAvalonApple 629d9c8253 feat: implement synthetic framing for user messages and enhance context strategy handling 2026-04-12 00:18:36 +03:00
Ibrahim Kazimov 167085c3a7
Merge branch 'main' into feat.mcp-tool-integration 2026-04-12 00:03:18 +03:00
MrAvalonApple 12dd802ad8 feat: update MCP GitHub example and added llmInputSchema 2026-04-12 00:01:22 +03:00
JackChen 1fbed196ca Revert "ci: add release workflow triggered by v*.*.* tags" 2026-04-11 15:25:24 +08:00
JackChen a220b6ecc5 ci: add release workflow triggered by v*.*.* tags 2026-04-11 15:23:41 +08:00
JackChen 89311dc4d4 chore: release 1.1.0 2026-04-11 15:15:15 +08:00
JackChen 06cc415ddf
docs: rewrite README top fold and trim Examples section (#95)
Strategic rewrite following docs/project-evaluation-2026-04-09.md.
README.md and README_zh.md updated in lockstep.

Top fold changes:
- New tagline positioning against CrewAI and LangGraph
- Replace 11-bullet "Why" with 3 bullets (runTeam / 3 deps / multi-model)
- New Philosophy section with "we build / we don't build / tracking"
- "We don't build" limited to handoffs and checkpointing (softened);
  Cloud/Studio bullet dropped to preserve future Hosted option
- New "How is this different from X?" FAQ covering LangGraph JS, CrewAI,
  and Vercel AI SDK
- New "Used by" section with three early-stage integrations, framed
  honestly for a new project (temodar-agent, rentech-quant-platform,
  cybersecurity SOC home lab)

Examples section:
- Shrink 15-row catalog table to 4 featured entries + link to examples/
- Featured: 02 team collaboration, 06 local model, 09 structured output,
  11 trace observability
- Eliminates maintenance debt of updating the table on every new example

Refinements during alignment pass:
- Launch date corrected to 2026-04-01 (matches first commit timestamp)
- Surface Gemini @google/genai peer dep in top fold and Providers table
- Rephrase "Agent handoffs" bullet to avoid reading as single-agent framework
- Update prose example to Opus 4.6 / GPT-5.4 / local Gemma 4
- Quick Start code example shortened ~30% (developer/reviewer collapsed
  to stubs, still demonstrates multi-agent team shape)
- Remove CrewAI endorsement stats (48K stars / Andrew Ng / $18M) to keep
  comparisons technical
- Drop Star History cache-buster since growth has stabilized; bump
  contributors cache-buster to max=20 so all 8 contributors render
- Delete Author section; shrink Contributing to Examples + Documentation

Small carry-over fixes:
- Fix duplicated task_complete line in Quick Start output sample
- Add AgentPool.runParallel() note to Three Ways to Run
- Update source file count 33 → 35

Kept unchanged per scope:
- Architecture diagram, Built-in Tools, Supported Providers

Does not touch source code or package.json.
2026-04-11 14:19:03 +08:00
Ibrahim Kazimov aa5fab59fa
feat: enforce dependency-scoped agent context (default-deny) (#87)
Co-authored-by: MrAvalonApple <74775400+ibrahimkazimov@users.noreply.github.com>
2026-04-10 03:09:58 +08:00
MrAvalonApple 7aa1bb7b5d feat: add connectMCPTools() to register MCP server tools as agent tools 2026-04-09 20:05:20 +03:00
MrAvalonApple eb484d9bbf feat: add context management strategies (sliding-window, summarize, custom) to prevent unbounded conversation growth 2026-04-09 19:40:15 +03:00
JackChen f1c7477a26 docs: fix MCP tracking issue link to #86 2026-04-09 03:29:58 +08:00
JackChen 664bed987f docs: restructure DECISIONS.md to signal openness on MCP and A2A
Split decisions into "Won't Do" (handoffs, checkpointing) and "Open to
Adoption" (MCP, A2A). Feature parity is a race that can be caught;
network effects from protocol adoption create a different kind of moat.

- MCP marked as "Next up" with optional peer dependency approach
- A2A marked as "Watching" with clear adoption trigger criteria
2026-04-09 03:16:38 +08:00
JackChen 2022882bfb
Merge pull request #85 from ibrahimkzmv/feat.customizable-coordinator
feat: make coordinator configurable (model, prompt, tools, and runtime options)
2026-04-08 18:56:12 +08:00
MrAvalonApple 0b57ffe3e9 feat: enhance CoordinatorConfig with toolPreset and disallowedTools options 2026-04-08 12:34:25 +03:00
JackChen 03dc897929 fix: eliminate duplicate progress events and double completedTaskCount in short-circuit path (#82)
The short-circuit block in runTeam() called this.runAgent(), which emits
its own agent_start/agent_complete events and increments completedTaskCount.
The short-circuit block then emitted the same events again, and
buildTeamRunResult() incremented the count a second time.

Fix: call buildAgent() + agent.run() directly, bypassing runAgent().
Events and counting are handled once by the short-circuit block and
buildTeamRunResult() respectively.
2026-04-08 12:49:13 +08:00
JackChen cb11020c65 chore: rename research aggregation example to 15- (avoid collision with 14-) 2026-04-08 12:14:23 +08:00
JackChen 91494bcca9
Merge pull request #79 from mvanhorn/osc/76-research-aggregation
feat: add multi-source research aggregation example
2026-04-08 12:13:48 +08:00