Describe the agents. Check the file. Run it.

A-Graph runs a graph of agents written in a YAML file. Models, prompts, tools, data and the edges between the nodes live in one file, checked before any model is called. A command line and a small HTTP service, written in Rust. MIT license.

$ a-graph --check graph.yml
[validation] graph.edges[1].end (unknown_ref): node `shortner` is not declared
no model called

$ a-graph --check graph.yml
(no output: the file is valid, exit 0)

$ a-graph graph.yml "A mutex is a lock that lets only one thread use a shared resource at a time."
▶ translator · local
▶ shortener · local
{"items":[{"node":"translator","message":"Un mutex è un blocco che permette a un solo thread di utilizzare una risorsa condivisa alla volta."},
          {"node":"shortener","message":"Il mutex blocca l'accesso condiviso per evitare race conditions."}]}

From examples/02-sequence: two nodes, one local model. The first transcript shows an error of the file as the checker reports it: phase, path, rule, message.

In plain words

Andrej Karpathy describes a language model as the CPU of a new kind of computer, with the context window as its RAM. On that computer an agent is a program. On a classical computer the operating system decides what a program may use; for many agents, that is written only in their code. In A-Graph it is declared in the file, and the engine does part of the work of an operating system: it checks the whole file before the first call, and it reaches only the hosts the file lists. The README tells the whole idea.

What happens to the file

  1. 1

    Declared

    One file: the passport with the hosts the graph may reach, the models, the prompts with their placeholders, tools and MCP servers, vector databases and memory, blackboards, nodes and edges.

  2. 2

    Checked

    Shape, links between ids, order of the edges, then the rules of each block. Every error at once, with its phase, its path and a rule with a stable code. --check uses no network.

  3. 3

    Run

    Sequences, groups that run one after the other or together or as batch jobs, a react loop with a controller, validation nodes that judge a result and can stop the run.

  4. 4

    Traced

    A JSON log on the standard error, a file or a URL; a timeline sent as OpenTelemetry at the end of the run; a live display. Each node has its own events (tokens, duration, calls, answers checked against a schema), to measure how stable each agent is, where it fails and why. Message contents only if the passport allows it.

Three small graphs

The graph block of three files. Each file also names its model and its prompts; the whole files are in examples.

graph:
  nodes:
    - id: assistant
      model: { id: local }
      resources: { prompt: answer }
      message:
        input: { user_message: true }
        output: { assistant_message: true }
  edges:
    - start: assistant

One node. A model answers the message. A graph of one node is its start alone. The whole file.

What it does today

ModelsAnthropic, OpenAI, Gemini, Mistral, Amazon Bedrock, Google Vertex AI, Microsoft Foundry, Ollama, and any server that speaks the Ollama contract; a gateway or a proxy in front of Anthropic, OpenAI, Gemini and Mistral. Reasoning levels, JSON output schemas, batch jobs, images in, images and audio out.
ToolsYour programs over stdio, your services over http, MCP servers over stdio and Streamable HTTP, skills in the Agent Skills format.
DataQdrant and Chroma searched with an embedding model, a conversation memory in a JSON file with summaries, blackboards shared by nodes.
UtilitiesPrograms in any language that change the data of a node before or after the model, without the model knowing.
Servicea-graph --serve service.yml: a caller sends a graph and a message over HTTP. Programs, files outside the session and hosts not allowed are refused before anything is built. A run joins the trace of its caller (traceparent). No authentication of its own.

Not yet

  • A blackboard kept at a URL.
  • Search, and a memory kept in a vector database.
  • Audio and video in.
  • A react inside a react.
  • The batch of Gemini and of Vertex AI with publisher google.
  • A sandbox for the programs a graph starts.

Who makes it

A-Graph is built by Agens Research Labs, four people who work on models and agents, infrastructure, product and security.

  • Fabio GagliardiAI researcher. The author of the engine.
  • Daniele BarbaroProduct and integrations.
  • Luigi SimeoneApplied AI and Data Science.
  • Enrico ZimuelTechnical advisor.

Install

git clone https://github.com/agens-research-labs/a-graph
cd a-graph
cargo install --path . --locked
ollama pull qwen3.5:4b
cd examples/01-hello
a-graph graph.yml "What is a mutex?"

You need Rust. The examples run against a local Ollama and need no key. Built and tested on Linux and macOS. Everything else is in the documentation.