AgentScope is a production-ready, easy-to-use agent framework with essential abstractions that work with rising model capability and built-in support for finetuning.
We design for increasingly agentic LLMs. Our approach leverages the models' reasoning and tool use abilities rather than constraining them with strict prompts and opinionated orchestrations.
- Simple: start building your agents in 5 minutes with built-in ReAct agent, tools, skills, human-in-the-loop steering, memory, planning, realtime voice, evaluation and model finetuning
- Extensible: large number of ecosystem integrations for tools, memory and observability; built-in support for MCP and A2A; message hub for flexible multi-agent orchestration and workflows
- Production-ready: deploy and serve your agents locally, as serverless in the cloud, or on your K8s cluster with built-in OTel support
- Node.js: 18.0.0 or higher (20.x recommended)
- Package Manager: pnpm 8.0.0+ (recommended) or npm
-
Human-in-the-loop: Built-in support for user confirmation and external execution, allowing seamless human intervention in agent workflows.
-
Event System: Multi-agent oriented event-driven architecture for tracking agent lifecycle, tool calls, and streaming responses, designed to be frontend-friendly.
-
MCP Support: Full integration with Model Context Protocol via both HTTP and stdio transports, enabling standardized tool communication.
-
Skill System: Extensible skill system for adding custom capabilities with automatic schema generation and hot-reloading support.
pnpm install @agentscope-ai/agentscope
# or
# npm install @agentscope-ai/agentscopeA quick example for using AgentScope
import { Agent } from '@agentscope-ai/agentscope/agent';
import { OpenAIModel } from '@agentscope-ai/agentscope/model';
import { Toolkit, Bash, Read, Write } from '@agentscope-ai/agentscope/tool';
// Create a model
const model = new OpenAIModel({
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-4o',
});
// Create a toolkit with built-in tools
const toolkit = new Toolkit({
tools: [Bash(), Read(), Write()],
skills: ['/path/to/your/skills'],
skillDirs: ['/path/to/your/skillDirs'], // Monitoring these directories
});
// Initialize an agent
const agent = new Agent({
name: 'Friday',
sysPrompt: 'You are a helpful assistant named Friday.',
model: model,
toolkit: toolkit,
});
// Use the agent
const res = await agent.reply();
console.log(res.text);
// Or, get streaming events from the agent reply
let name = '';
for await (const event of agent.replyStream({})) {
switch (event.type) {
case EventType.RUN_STARTED:
name = event.name;
break;
case EventType.TEXT_BLOCK_START:
process.stdout.write(`${name}: `);
break;
case EventType.TEXT_BLOCK_DELTA:
process.stdout.write(event.delta);
break;
case EventType.TEXT_BLOCK_END:
process.stdout.write('\n\n');
break;
}
}This is a monorepo containing:
packages/agentscope: Core AgentScope libraryapp/friday: Example Electron application built with AgentScope
AgentScope is released under Apache License 2.0.
All thanks to our contributors: