@deskcreate/agentcraft
    Preparing search index...

    @deskcreate/agentcraft

    AgentCraft

    npm version License: MIT CI Node >= 20

    Production-grade TypeScript agent runtime with provider routing, tools, MCP, skills, workflows, structured output, streaming, budgets, and observability.

    npm install @deskcreate/agentcraft
    
    import { Agent, Provider } from "@deskcreate/agentcraft";

    const agent = Agent.create({
    model: Provider.openai["gpt-4o-mini"],
    apiKey: process.env.OPENAI_API_KEY!,
    });

    const result = await agent.run({
    prompt: "Summarize why typed tool calls matter.",
    responseSchema: {
    type: "object",
    required: ["summary", "risks"],
    properties: {
    summary: { type: "string" },
    risks: { type: "array", items: { type: "string" } },
    },
    },
    structuredOutput: { retries: 1 },
    trace: true,
    });

    console.log(result.structuredResponse);
    console.log(result.trace);
    • Provider-portable calls across OpenAI-compatible, Anthropic, Google, Bedrock, and Cohere protocols.
    • Secure tool lifecycle with approvals, dry-run/read-only modes, guardrails, redaction, timeouts, and audits.
    • MCP runtime for stdio, HTTP JSON-RPC, and SSE transports.
    • Built-in adapters for filesystem, fetch, GitHub, database, browser, SaaS, storage, vector, voice, and image workflows.
    • Built-in skills with structured prompt metadata and dependency validation.
    • Structured output with JSON Schema, Zod-like schemas, native JSON mode, retry repair, and tool fallback.
    • Streaming events for model deltas, tool calls, tool results, and finals.
    • Run budgets, cost estimates, fallback routing, and AgentTeam orchestration.
    • AgentWorkflow for repeatable step graphs with retries, approvals, branches, parallel fan-out, Zod-validated input, and resumable failed runs.
    • AgentWorkspace for shared runtime context wiring cache, adapters, tool policy, budget, events, and artifact stores once for teams and workflows.
    • ArtifactStore for typed durable persistence with MemoryArtifactStore, FileArtifactStore, and SQLiteArtifactStore backends.
    • ArtifactRegistry for 19 built-in creator artifact schemas with custom extension support.

    For the local documentation site:

    npm run docs:dev
    

    See the examples guide for basic chat, structured output, streaming with tools, safe filesystem usage, GitHub review, MCP GitHub, research, AgentTeam, AgentWorkflow, ArtifactStore, cost budgeting, and custom adapter patterns.

    AgentCraft treats prompt, file, browser, MCP, retrieval, and tool inputs as untrusted by default. Side-effecting tools require approval metadata and should be run with policy controls in production.

    Pricing metadata is source-stamped and estimator-grade. Update the model catalog against official provider pricing before using estimates for billing or hard financial commitments.

    Unit tests are mocked and do not require live API keys:

    npm test
    

    Live integration tests are opt-in and should be run with cost-bounded provider keys only:

    INTEGRATION_TESTS=true npm run test:int:light