Examples

Explore practical examples and use cases for AgentApiary. These examples demonstrate how to create and manage AI agents, build multi-agent systems, and orchestrate complex workflows.

Getting Started

These examples cover basic AgentApiary concepts and common use cases:

Quick Start

Get up and running quickly with a simple agent deployment. Learn the basics of creating cells, agent specs, and hives.

View Example
Pipeline Pattern

Build a sequential data processing pipeline where each stage's output becomes the next stage's input.

View Example
Hierarchical Pattern

Implement a supervisor-worker pattern where a supervisor coordinates multiple specialized workers.

View Example
Event-Driven Pattern

Create event-driven workflows where agents subscribe to events and process them asynchronously.

View Example
Swarm Pattern

Build consensus systems where all agents in a swarm receive messages and process independently.

View Example
Composed Pattern

Combine multiple orchestration patterns in sequence to build complex, multi-stage workflows.

View Example

Use Case Examples

Multi-Agent AI Systems

Coordinate specialized AI agents working together to solve complex problems. Each agent has a specific role and communicates with others through the message bus.

# Example: Multi-agent system with specialized roles
apiaryctl apply -f examples/multi-agent-system/agentspecs.yaml
apiaryctl apply -f examples/multi-agent-system/hive.yaml

AI Workflows

Build complex data processing pipelines with AI components. Process data through multiple stages, each handled by specialized agents.

# Example: Data processing pipeline
apiaryctl apply -f examples/data-pipeline/stage1.yaml
apiaryctl apply -f examples/data-pipeline/stage2.yaml
apiaryctl apply -f examples/data-pipeline/hive.yaml

LLM Applications

Deploy and scale language model applications with multi-agent coordination. Handle conversation management, context tracking, and response generation.

# Example: LLM application with session management
apiaryctl apply -f examples/llm-app/agentspec.yaml
apiaryctl apply -f examples/llm-app/hive.yaml
apiaryctl create session --hive my-llm-hive

Event Processing

Process events in real-time with AI-powered agents. Subscribe to event streams and react to changes asynchronously.

# Example: Event-driven processing
apiaryctl apply -f examples/event-processing/agentspecs.yaml
apiaryctl apply -f examples/event-processing/hive.yaml

Best Practices

Contributing Examples

We welcome community contributions! If you have an interesting use case or example, please submit a pull request to the AgentApiary repository.

When contributing examples: