Back to Documentation

Agent Members & Coordination

Organize specialized AI agents as team members with defined roles and capabilities

What Are Agent Members?

Agent Members are AI agents configured as organization members with custom roles and system prompts. Each agent is launched via CLI and connects to your Agiflow backend for task assignment and session management.

# Launch Claude agent for a task
agent-cli claude --agent-session-id your-session-id --alias "backend-dev"
# Standalone mode (no backend connection)
agent-cli claude --standalone
# Route to GPT-5 for specific tasks
agent-cli claude --llm-provider chatgpt --llm-model gpt-5 --alias "gpt5-review"

Unlike single-agent setups where you manually manage context and switching between tasks, agent members provide organizational structure with role-based task assignment and session continuity.

The Problem: Managing Multiple AI Agent Contexts

When working with AI agents on complex projects, you face several challenges:

Manual Context Switching

You manually prompt each agent for their role: "Act as a backend developer..." or "Review this code for security...". This overhead adds up across tasks.

Without Agent Members:
• Start Claude → "Act as backend developer, implement OAuth..."
• Stop Claude → Start new session → "Act as frontend dev, build login UI..."
• Stop session → Start new one → "Review the authentication flow for security..."
Result: 5-10 min context overhead per task switch

No Specialized Model Selection

Different tasks need different AI capabilities. Code review benefits from reasoning models like GPT-5, while rapid prototyping works better with Claude. Manual model switching is tedious.

Lost Session Context

When switching between tasks or models, you lose session continuity. No clear tracking of which agent worked on which task or what was accomplished.

How Agent Members Solve This

1. Define Specialized Agents Once

Create agent members in your organization with custom roles and system prompts. These configurations are stored and reused across all tasks.

Example Agent Configurations

nodejs-hono-api-developer
Agent Member

Role: Backend API Developer
Prompt: "You are a Node.js backend developer specializing in Hono.js APIs. Focus on OpenAPI specs, proper error handling, and Drizzle ORM patterns..."

spa-frontend-developer
Agent Member

Role: React SPA Developer
Prompt: "You build React SPAs with TanStack Router and Query. Use @agimonai/web-ui components, follow accessibility standards..."

senior-architect-overseer
Agent Member

Role: Code Review & Architecture
Prompt: "Review code for security, performance, and architectural consistency. Check against project design patterns and coding standards..."

2. Launch Agents with Session Management

Use the agent-cli to launch agents with specific configurations. Each agent gets a session ID and alias for easy identification and management.

# Launch Claude for backend task (uses member prompt)
agent-cli claude --agent-session-id task-123 --alias "backend-oauth"
# Launch GPT-5 for code review
agent-cli claude --llm-provider chatgpt --llm-model gpt-5 \
--agent-session-id task-456 --alias "review-auth"
# Standalone mode (no backend connection)
agent-cli claude --standalone --alias "local-dev"

3. Dynamic Model Routing

Switch between AI models without restarting sessions. Route requests to different providers (Claude, GPT-5, GPT-5 Codex) with configurable reasoning effort levels.

# Interactively change routing for active sessions
agent-cli router
# Select session → Choose routing:
• Default (Claude)
• GPT-5 (Reasoning: High) ← Selected
• GPT-5 Codex (Reasoning: Medium)

Available reasoning levels: high, medium, low, minimal

4. Backend Integration for Task Assignment

When connected to Agiflow backend (via agent-cli connect), agents automatically receive task assignments, work unit context, and MCP tool configurations.

LXX-4Implement Google OAuth endpoint
nodejs-hono-api-developer
LXX-5Create login UI component
spa-frontend-developer
LXX-6Review authentication flow
senior-architect-overseer

Agent CLI Workflow

Step 1: Connect Daemon (Optional)

For backend-connected mode, start the Agiflow daemon to receive task assignments and sync session state.

# Authenticate and connect to Agiflow backend
agent-cli connect
# Daemon receives tasks from dashboard and routes to agents

Step 2: Configure Agent Members (Dashboard)

In your Agiflow dashboard, create agent members with roles and custom prompts. These configurations are pulled by the CLI when launching agents.

Step 3: Launch Agents for Tasks

Launch agents with session IDs matching your tasks. The agent automatically applies the member's custom prompt and configuration.

# Backend task with agent member prompt
agent-cli claude --agent-session-id LXX-4 --alias "oauth-impl"
# Route to GPT-5 for complex reasoning
agent-cli claude --agent-session-id LXX-6 \
--llm-provider chatgpt --llm-model gpt-5 \
--alias "security-review"

Step 4: Dynamic Routing (Optional)

Change AI models for running sessions without restart. Useful when a task needs different reasoning capabilities mid-execution.

agent-cli router
# Interactive menu: Select session → Choose GPT-5 with reasoning level

Step 5: Session Tracking

All agent activity is logged with session IDs and aliases. View logs in the dashboard to track which agent worked on which task and what was accomplished.

Key Capabilities

Persistent Prompts

Define agent roles once in dashboard. CLI automatically applies the custom prompt when launching with --agent-session-id.

Model Flexibility

Route to Claude (default), GPT-5, or GPT-5 Codex with configurable reasoning effort (high, medium, low, minimal). Switch models dynamically via agent-cli router.

Standalone Mode

Run agents locally without backend connection (--standalone). Useful for testing agent configurations or working offline.

Session Aliases

Use human-readable aliases (--alias "backend-oauth") for easy session identification instead of UUIDs. Aliases appear in logs and routing menus.

Docker Support

Run agents in Docker containers (--docker) for isolated execution environments. Useful for testing or sandboxed tasks.

Related Documentation

Build your specialized AI agent team

Configure agent members with domain expertise and start delegating work systematically.