Skip to main content

Examples

Working agent definitions you can clone and run. All examples live in the examples/ directory of the repository.

The four featured examples below cover the typical learning path: simplest possible agent → persistence → multi-agent collaboration → cloud deployment.

minimal — Hello World

The smallest possible agent: a model, instructions, and an API channel. No tools, no persistence. Use this to verify your install works and to get a feel for the deploy loop.

name: minimal-agent
instructions: |
You are a minimal agent. Just chat.
model:
name: minimax
provider: { name: anthropic, type: anthropic }
model_name: MiniMax-M2.7
parameters:
anthropic_api_url: https://api.minimax.io/anthropic
platform:
name: docker
type: docker
provider: { name: docker, type: docker }
channels:
- name: api
type: api
secrets:
- name: ANTHROPIC_API_KEY
port: 8090

Run it:

cd examples/minimal
export ANTHROPIC_API_KEY=...
vystak apply
vystak-chat --url http://localhost:8090

What it teaches: the minimal agent shape and the Vystak deploy loop.


sessions-postgres — Persistent conversations

Same agent shape as minimal, but with sessions: postgres. Vystak provisions a Postgres container alongside the agent and wires up the LangGraph Postgres checkpointer. Conversations survive restarts.

name: sessions-agent
instructions: |
You are a helpful assistant with persistent memory of our conversation.
model: { ... } # same as minimal
platform: { ... }
sessions:
type: postgres
provider:
name: docker
type: docker
channels:
- name: api
type: api

Run it:

cd examples/sessions-postgres
vystak apply
# Talk to it, exit, redeploy — your conversation is still there

What it teaches: session persistence and how Vystak provisions backing services automatically.


multi-agent — A2A collaboration

Three agents in one deployment: a weather specialist, a time specialist, and an assistant that calls both. The assistant's tools (ask_weather_agent, ask_time_agent) use Vystak's A2A (agent-to-agent) protocol over HTTP.

Vystak deploys all three agents to the shared vystak-net Docker network and stands up a gateway that knows how to route to each one.

Run it:

cd examples/multi-agent
vystak apply weather time assistant
vystak-chat --gateway http://localhost:8080 \
-p "Weather in NYC and what time is it there?"

The assistant calls weather and time in parallel, then synthesizes a single answer.

What it teaches: multi-agent orchestration, the A2A protocol, and the gateway.


azure-multi-agent — Cloud deployment

The same multi-agent pattern, deployed to Azure Container Apps instead of Docker. The only difference from the Docker version is the platform and provider fields:

platform:
name: aca
type: container-apps
provider:
name: azure
type: azure
config:
location: eastus2

Vystak provisions a resource group, an Azure Container Registry, an ACA Environment, and the three Container Apps. Same agent definitions, different target.

Run it:

cd examples/azure-multi-agent
az login
vystak apply

What it teaches: that "define once, deploy everywhere" is real. The agent definitions are nearly identical to the Docker version.


All examples

Beyond the featured four, the examples/ directory also includes:

  • hello-agent — a slightly richer "hello world" with a couple of tools, useful for tinkering.
  • code-first — the same agents defined in Python (vystak.py) instead of YAML.
  • memory-agent — long-term memory across sessions (Postgres-backed).
  • mcp-files — exposes a filesystem MCP server as agent tools.
  • azure-minimal — the simplest possible Azure deploy (single agent, no extras).
  • azure-postgres-test — Azure Container App with a managed Postgres Flexible Server.

Each is a standalone directory with its own vystak.yaml (or vystak.py).

What's next