Skip to main content

1. Create a LangGraph Agent

Create agent.py:
from typing import TypedDict
from langgraph.graph import StateGraph, END


class State(TypedDict):
    text: str


def reply_node(state: State) -> State:
    return {"text": f"Echo: {state['text']}"}


def build_graph():
    graph = StateGraph(State)
    graph.add_node("reply", reply_node)
    graph.set_entry_point("reply")
    graph.add_edge("reply", END)
    return graph

2. Configure aion.yaml

aion:
  agents:
    support:
      path: "./agent.py:build_graph"
      framework: "langgraph"
      name: "Support Agent"
      capabilities:
        streaming: true

3. Optional: Add Control Plane Credentials to .env

# .env
AION_CLIENT_ID=your_client_id
AION_CLIENT_SECRET=your_client_secret
For Aion-hosted deployments, these are provided by the control plane. Add them to .env only when running outside Aion-hosted deployments or when testing local control plane connectivity. For more information, see Environment Variables.

4. Start Services

aion serve
This starts agent process(es) plus a proxy process with dynamic ports.

5. Validate Endpoints

curl http://localhost:10000/health/
curl http://localhost:10000/.well-known/manifest.json
curl http://localhost:10000/agents/support/.well-known/agent-card.json

6. Test Interactively

aion chat --host http://localhost:10000 --agent-id support