Skip to main content

Quickstart

This guide walks you through installing Agentium and building your first agent in three steps.

Installation

Install the core package and your preferred LLM provider:
For other providers, install anthropic or @google/genai instead of (or in addition to) openai. Set your API key as an environment variable:

Step 1: Create Your First Agent

Create a simple agent with a few lines of code:
index.ts
Run it:
You now have a working agent that responds to user input.

Step 2: Add Tools

Extend your agent with function calling. Define tools with Zod schemas for type-safe parameters:
weather-agent.ts
The agent will call get_weather when needed and incorporate the result into its response.

Step 3: Stream Responses

For real-time output, use the streaming API:
stream-agent.ts
Streaming supports both text and tool-call chunks. Handle each chunk.type as needed for your use case.

Next Steps

Agents

Learn about agent configuration, instructions, and advanced options.

Models

Switch providers, use local models with Ollama, or build custom adapters.

Teams

Coordinate multiple agents with route, broadcast, and collaborate modes.

Workflows

Build stateful multi-step workflows with conditions and parallel execution.