@deskcreate/agentcraft
v0.2.0
Published
Production-grade TypeScript agent runtime with provider routing, tools, MCP, skills, workflows, structured output, streaming, budgets, and observability.
Maintainers
Readme
AgentCraft
Production-grade TypeScript agent runtime with provider routing, tools, MCP, skills, workflows, structured output, streaming, budgets, and observability.
Install
npm install @deskcreate/agentcraft60-Second Quickstart
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);Core Ideas
- 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.
AgentWorkflowfor repeatable step graphs with retries, approvals, branches, parallel fan-out, Zod-validated input, and resumable failed runs.AgentWorkspacefor shared runtime context wiring cache, adapters, tool policy, budget, events, and artifact stores once for teams and workflows.ArtifactStorefor typed durable persistence withMemoryArtifactStore,FileArtifactStore, andSQLiteArtifactStorebackends.ArtifactRegistryfor 19 built-in creator artifact schemas with custom extension support.
Guides
- Architecture
- Quickstart
- Feature Map
- Run Configuration
- Provider Configuration
- Tool Lifecycle
- MCP Overview
- Security Model
- Pricing and Budgets
- AgentTeam Orchestration
- AgentWorkflow
- AgentWorkspace
- ArtifactStore
- ArtifactRegistry
- Adapter Authoring
- Skill Authoring
- Structured Output
- Guardrails
For the local documentation site:
npm run docs:devExamples
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.
Safety Defaults
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.
Testing
Unit tests are mocked and do not require live API keys:
npm testLive integration tests are opt-in and should be run with cost-bounded provider keys only:
INTEGRATION_TESTS=true npm run test:int:light