Astreus

高度なサブエージェント

複雑な連携パターンと専門的な機能を備えた、洗練されたマルチエージェントワークフローを構築します。 信頼性の高いAstreusエージェントシステムを構築するために必要なセットアップのパターン、API、実践的な例を学びましょう。

複雑な連携パターンと専門的な機能を備えた、洗練されたマルチエージェントワークフローを構築します。

クイックスタート

完全なサンプルをクローンする

最も簡単な始め方は、完全なサンプルリポジトリをクローンすることです。

git clone https://github.com/astreus-ai/examples
cd examples/sub-agents-advanced
npm install

またはパッケージのみをインストール

ゼロから構築したい場合は次のようにします。

npm install @astreus-ai/astreus

環境設定

# .env
OPENAI_API_KEY=sk-your-openai-api-key-here
ANTHROPIC_API_KEY=your-anthropic-api-key-here
DB_URL=sqlite://./astreus.db

マルチモデルエージェントチーム

import { Agent } from '@astreus-ai/astreus';

// Create diverse agent team with different models
const strategicPlanner = await Agent.create({
  name: 'StrategicPlanner',
  model: 'gpt-4o',  // High reasoning for strategy
  systemPrompt: 'You are a strategic business consultant with deep analytical thinking.',
  memory: true,
  knowledge: true
});

const creativeWriter = await Agent.create({
  name: 'CreativeWriter',
  model: 'claude-3-5-sonnet-20241022',  // Excellent for creative writing
  systemPrompt: 'You are a creative copywriter who crafts compelling narratives.',
  vision: true
});

const dataScientist = await Agent.create({
  name: 'DataScientist',
  model: 'gpt-4o',  // Strong analytical capabilities
  systemPrompt: 'You are a data scientist specializing in statistical analysis and insights.',
  useTools: true
});

const executiveTeam = await Agent.create({
  name: 'ExecutiveTeam',
  model: 'gpt-4o',  // High-level coordination
  systemPrompt: 'You coordinate executive-level strategic initiatives across expert teams.',
  subAgents: [strategicPlanner, creativeWriter, dataScientist]
});

const businessPlan = await executiveTeam.ask(
  'Develop comprehensive go-to-market strategy for AI-powered healthcare platform',
  {
    useSubAgents: true,
    delegation: 'auto',
    coordination: 'sequential'
  }
);

console.log('Business plan completed:', businessPlan);

サンプルの実行

リポジトリをクローンした場合は次を実行します。

npm run dev

ゼロから構築した場合は、上記のコードを含むindex.tsファイルを作成し、次を実行します。

npx tsx index.ts

リポジトリ

完全なサンプルはGitHubで公開されています: examples/sub-agents-advanced

最終更新日: 2026年7月6日

このセクション内

最初のエージェント

Astreusのドキュメントで最初のエージェントについて学び、エージェントシステムを構築するためのセットアップの手引き、APIのパターン、実践的な例を確認しましょう。 信頼性の高いAstreusエージェントシステムを構築するために必要なセットアップのパターン、API、実践的な例を学びましょう。

メモリを使ったエージェント

Astreusのドキュメントでメモリを使ったエージェントについて学び、エージェントシステムを構築するためのセットアップの手引き、APIのパターン、実践的な例を確認しましょう。 信頼性の高いAstreusエージェントシステムを構築するために必要なセットアップのパターン、API、実践的な例を学びましょう。

ナレッジを使ったエージェント

Astreusのドキュメントでナレッジを使ったエージェントについて学び、エージェントシステムを構築するためのセットアップの手引き、APIのパターン、実践的な例を確認しましょう。 信頼性の高いAstreusエージェントシステムを構築するために必要なセットアップのパターン、API、実践的な例を学びましょう。

ビジョンを使ったエージェント

Astreusのドキュメントでビジョンを使ったエージェントについて学び、エージェントシステムを構築するためのセットアップの手引き、APIのパターン、実践的な例を確認しましょう。 信頼性の高いAstreusエージェントシステムを構築するために必要なセットアップのパターン、API、実践的な例を学びましょう。