Easy to Read & Understand
Simple YAML format that developers can quickly grasp and work with, making agent development accessible to everyone.
Get started with AgentSchema in your preferred language:
pip install agentschemanpm install agentschemadotnet add package AgentSchemago get github.com/microsoft/agentschema-go/agentschemafrom agentschema import AgentDefinition
# Load from YAML fileagent = AgentDefinition.from_yaml_file("agent.yaml")
# Or create programmaticallyagent = AgentDefinition( name="my-assistant", description="A helpful AI assistant", model="gpt-4o", instructions="You are a helpful assistant.")
# Save to YAMLagent.to_yaml_file("agent.yaml")import { AgentDefinition } from 'agentschema';import { readFileSync, writeFileSync } from 'fs';
// Load from YAML fileconst yaml = readFileSync('agent.yaml', 'utf-8');const agent = AgentDefinition.fromYaml(yaml);
// Or create programmaticallyconst agent = new AgentDefinition({ name: 'my-assistant', description: 'A helpful AI assistant', model: 'gpt-4o', instructions: 'You are a helpful assistant.'});
// Save to YAMLwriteFileSync('agent.yaml', agent.toYaml());using AgentSchema;
// Load from YAML filevar yaml = File.ReadAllText("agent.yaml");var agent = AgentDefinition.FromYaml(yaml);
// Or create programmaticallyvar agent = new AgentDefinition{ Name = "my-assistant", Description = "A helpful AI assistant", Model = "gpt-4o", Instructions = "You are a helpful assistant."};
// Save to YAMLFile.WriteAllText("agent.yaml", agent.ToYaml());package main
import ( "os" "github.com/microsoft/agentschema-go/agentschema")
func main() { // Load from YAML file agent, _ := agentschema.LoadAgentDefinitionFromFile("agent.yaml")
// Or create programmatically agent := &agentschema.AgentDefinition{ Name: agentschema.String("my-assistant"), Description: agentschema.String("A helpful AI assistant"), Model: "gpt-4o", Instructions: agentschema.String("You are a helpful assistant."), }
// Save to YAML yaml, _ := agent.ToYAML() os.WriteFile("agent.yaml", []byte(yaml), 0644)}Easy to Read & Understand
Simple YAML format that developers can quickly grasp and work with, making agent development accessible to everyone.
Easy Integration
Designed to be easily added to existing repositories without major restructuring or complex setup processes.
Platform Exchange Format
Serves as a unified exchange format between Microsoft Copilot Studio, Microsoft Foundry, and future platforms.
Unified Object Model
Creates a consistent agentic primitive object model that standardizes how agents are defined and structured.
Enterprise-Grade Quality
A joint collaboration between Microsoft Copilot Studio and Microsoft Foundry teams, ensuring production-ready reliability.
Modern Architecture
Built with modern development practices and incorporates advanced agentic features and capabilities.
📖 Object Model
Explore the complete AgentSchema object model with detailed documentation and examples.
📦 Runtimes
Use our official runtime libraries to work with AgentSchema in TypeScript, Python, C#, or Go.
🚀 Examples
See AgentSchema in action with real-world examples including analyst, QnA, and travel agents.
🤝 Contributing
Help improve the specification by contributing to the AgentSchema project.
⚙️ Code Generation
Generate your own runtime libraries with the TypeSpec emitter.
AgentSchema bridges the gap across different agentic platforms, providing a standardized way to define and deploy agents regardless of your chosen environment. It incorporates advanced agentic capabilities while maintaining simplicity and readability, making it the ideal choice for modern agent development workflows.