Agent(...) and it is ready to reply. The examples below cover the most common setups.
Parameters
All configuration enters through theAgent(...) constructor. The table below lists every parameter, with the tunable knobs grouped into config objects:
Switch Models
Switching the LLM provider only changes themodel argument: every provider follows the same Model(credential=..., model=...) pattern, and the rest of the agent stays untouched.
Support Multi-Entity Conversations
An agent is not limited to one-user-one-agent chat. In an agent team, a group chat, or a game with NPCs, messages from multiple named entities share the same context, and the agent must know who said what. In AgentScope, each speaker is identified by thename field of its Msg. A multi-entity conversation is simply a list of messages with different names fed into the agent:
Msg objects into the provider’s API format before each model call. The default chat formatter maps messages onto the API’s bare user/assistant roles, which fits one-user-one-agent chat but drops the names, leaving the speakers indistinguishable.
For multi-entity conversations, each provider ships a MultiAgentFormatter. It merges the history into a single named transcript (Alice: ..., Bob: ...) carried in a user message, so the LLM sees each speaker’s identity. Switch by passing it to the model:
Next Steps
Tool
How to build tools, and connect MCP servers and skills.
Middleware
How to hook into reply, reasoning, acting, and model calls.
Workspace
How to work in different sandboxes.
Permission System
How to control which tool calls run, ask, or are denied.