mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 22:37:29 +00:00
feat(agentswarm): M1+M3 — embeddable swarm runtime wrapping deepagents
@logicsrc/agentswarm: a self-hosted, framework-agnostic multi-agent runtime that each app mounts on its own route (e.g. tronbrowser.dev/swarm). M1 — core: - createSwarmHandler(): Web (Request)=>Response handler, CORS + validation - SwarmRunner: injectable engine interface - createDeepAgentRunner(): deepagents (createDeepAgent) adapter; deepagents + @langchain/langgraph are optional peers loaded via dynamic import so the core builds/tests with zero heavy deps - SwarmError + onRequest gate: seam for x402 metering / auth (402/403) M3 — rubric self-check (deepagents RubricMiddleware is Python-only, so ported at the runner layer): - createRubricRunner(): grades output via an injectable judge and revises until it passes or maxIterations; passes through untouched when no rubric - createLLMJudge(): cheap-model grader (lazy langchain initChatModel) 13/13 vitest pass; tsc clean; examples/server.mjs demo verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ffe37a01ce
commit
018a583a00
13 changed files with 805 additions and 1 deletions
19
packages/agentswarm/src/index.ts
Normal file
19
packages/agentswarm/src/index.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @logicsrc/agentswarm — embeddable multi-agent swarm runtime, wrapping deepagents.
|
||||
*
|
||||
* Mount {@link createSwarmHandler} on a route in your own app (e.g. `/swarm`);
|
||||
* back it with {@link createDeepAgentRunner} or any custom {@link SwarmRunner}.
|
||||
*/
|
||||
export { createSwarmHandler } from "./handler.js";
|
||||
export type { SwarmHandlerOptions } from "./handler.js";
|
||||
export { createDeepAgentRunner } from "./runner.js";
|
||||
export type { DeepAgentRunnerOptions } from "./runner.js";
|
||||
export { createRubricRunner, createLLMJudge } from "./rubric.js";
|
||||
export type {
|
||||
RubricEvaluation,
|
||||
RubricJudge,
|
||||
RubricJudgeInput,
|
||||
RubricRunnerOptions,
|
||||
LLMJudgeOptions
|
||||
} from "./rubric.js";
|
||||
export * from "./types.js";
|
||||
Loading…
Add table
Add a link
Reference in a new issue