Skip to content

[Feature] Agents package#33

Merged
sajeerzeji merged 15 commits into
toolpack-ai:mainfrom
sajeerzeji:feature/agents
May 1, 2026
Merged

[Feature] Agents package#33
sajeerzeji merged 15 commits into
toolpack-ai:mainfrom
sajeerzeji:feature/agents

Conversation

@sajeerzeji
Copy link
Copy Markdown
Contributor

Description

Introduces @toolpack-sdk/agents — a new package for building production-ready AI agents with channels, interceptors, conversation history, and multi-agent coordination. This is the first release of the agents package (v1.4.0) alongside updates to toolpack-sdk and @toolpack-sdk/knowledge.

What's included:

@toolpack-sdk/agents (new package)

  • BaseAgent abstract class — interceptor chain, conversation history assembly, lifecycle hooks, LLM invocation via run(), human-in-the-loop via ask()/getPendingAsk()/handlePendingAsk()
  • AgentRegistry — multi-agent orchestration with local and JSON-RPC transport
  • 7 channel integrations: Slack, Telegram, Discord, Email, SMS, Webhook, ScheduledChannel (cron)
  • 4 built-in concrete agents: ResearchAgent, CodingAgent, DataAgent, BrowserAgent
  • 10 built-in interceptors: dedup, noise filter, self-filter, rate limit, address check, intent classifier, participant resolver, capture-history, depth guard, tracer
  • 2 capability agents: IntentClassifierAgent, SummarizerAgent
  • Conversation history: InMemoryConversationStore, assemblePrompt(), createConversationSearchTool()
  • LocalTransport and JsonRpcTransport for in-process and cross-process agent delegation
  • AgentRegistry (npm registry search/publish) via @toolpack-sdk/agents/registry
  • Subpath exports: /interceptors, /channels, /testing, /registry, /capabilities
  • Full ScriptedLLM test helper for integration testing without live API calls
  • 573 tests passing across 29 test files

toolpack-sdk updates

  • Added github-tools (9 tools: PR diff, PR files list, PR review threads, review comments, review submit)
  • Added k8s-tools (11 tools)
  • enrichRequestWithTools() refactored to return EnrichedRequestResult with .request and .requestToolMap to support per-agent tool scoping
  • stripRequestTools() added to AIClient for re-enrichment on follow-up rounds
  • Tool count updated: 97 built-in tools across 12 categories

@toolpack-sdk/knowledge updates

  • README updated: added JSONSource, SQLiteSource, PostgresSource, OpenRouterEmbedder documentation; added missing OllamaEmbedder options (retries, retryDelay, dimensions); added WebUrlSource safety options (sameDomainOnly, maxPagesPerDomain)

scripts/update-version.js

  • Updated to handle version bumps across all three packages (toolpack-sdk, @toolpack-sdk/knowledge, @toolpack-sdk/agents)

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • npm run test — 780 tests passing in toolpack-sdk, 573 tests passing in @toolpack-sdk/agents
  • Manual testing — integration tests cover 7 multi-agent scenarios including delegation, conversation search isolation, channel subscription gating, and human-in-the-loop flows

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (run npm run lint)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…feature/agents

Resolved conflicts in client/index.ts, toolpack.ts, and index.ts by
combining enrichRequestWithTools() return type refactor (EnrichedRequestResult)
from feature/agents with enforceContextWindow() calls from PR toolpack-ai#32.
- Remove empty src/conversation-history/ directory (caused ESLint glob to fail with "no files matching pattern")
- Change let → const for result in base-agent.ts and results in mock-knowledge.ts (prefer-const errors)
@sajeerzeji sajeerzeji merged commit 34e4c90 into toolpack-ai:main May 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant