Complex Workflows
Build sophisticated multi-agent workflows with advanced orchestration patterns. Learn the setup patterns, APIs, and practical examples needed to build...
Build sophisticated multi-agent workflows with advanced orchestration patterns.
Quick Start
Clone the Complete Example
The easiest way to get started is to clone the complete example repository:
git clone https://github.com/astreus-ai/examples
cd examples/complex-workflows
npm installOr Install Package Only
If you prefer to build from scratch:
npm install @astreus-ai/astreusEnvironment Setup
# .env
OPENAI_API_KEY=sk-your-openai-api-key-here
DB_URL=sqlite://./astreus.dbMulti-Agent Workflow
import { Agent, Graph } from '@astreus-ai/astreus';
// Create specialized agents
const researcher = await Agent.create({
name: 'Researcher',
model: 'gpt-4o',
systemPrompt: 'You research topics thoroughly.'
});
const writer = await Agent.create({
name: 'Writer',
model: 'gpt-4o',
systemPrompt: 'You create engaging content.'
});
// Create workflow pipeline
const pipeline = new Graph({
name: 'content-pipeline'
}, researcher);
// Define workflow steps
const research = pipeline.addTaskNode({
prompt: 'Research AI trends in 2024',
agentId: researcher.id
});
const article = pipeline.addTaskNode({
prompt: 'Write an article based on the research',
agentId: writer.id,
dependencies: [research]
});
// Execute the workflow
const results = await pipeline.run();
// Parse the result and extract the response
if (results.success && results.results[article]) {
const articleResult = JSON.parse(results.results[article]);
console.log(articleResult.response);
}Running the Example
If you cloned the repository:
npm run devRepository
The complete example is available on GitHub: examples/complex-workflows
Last updated: July 6, 2026
In this section
Your First Agent
Create your first AI agent with Astreus framework. Learn the setup patterns, APIs, and practical examples needed to build reliable Astreus agent systems.
Agent with Memory
Build agents with persistent memory capabilities. Learn the setup patterns, APIs, and practical examples needed to build reliable Astreus agent systems.
Agent with Knowledge
Create agents with knowledge base capabilities for enhanced information retrieval. Learn the setup patterns, APIs, and practical examples needed to build...
Agent with Vision
Create agents capable of processing and analyzing images. Learn the setup patterns, APIs, and practical examples needed to build reliable Astreus agent systems.