Skip to content
LogoLogo

toolang

A language and runtime for agents and humans.

The language is essentially natural language, so both humans and models can read and write it. Just a few keywords and rules make it structured enough for the runtime to execute.

Why Toolang

Prompts describe workflows, but cannot enforce them. The model controls execution, so steps can be skipped, checks overlooked, or actions performed out of order.

Agent setups are difficult to share and reuse. Sharing an agent often means sharing instructions for rebuilding it, rather than something others can run directly.

The language

The language is built around agics, flows, and caps.

An agic is a callable agent loop, similar to a function. It accepts inputs, uses a model to follow instructions and call tools as needed, and returns text or structured data.

A flow combines agics and other flows into explicit workflows. It controls how tasks are sequenced, repeated, or executed in parallel, and how results are processed. While an agic lets the model decide how to carry out a task, a flow defines how execution proceeds.

Agics and flows are called runnables. Both accept inputs, produce results, and can be composed and reused.

Caps, short for composable agent primitives, come in four forms: psyches provide instructions that shape agent behavior, skills provide knowledge and procedures, services connect external tools, and prompts define reusable message templates. Caps can be defined inline or referenced from other sources.

The runtime

The runtime executes runnables defined in .too programs. Each execution is called a run. For an agic, the runtime manages an agent loop, coordinating model calls and tool use. For a flow, it executes statements according to explicit rules.

Runs belong to threads and consist of steps representing individual operations. Execution history is stored durably, allowing users to inspect past runs and monitor ongoing work.

Runs are initiated by drivers, which connect different interaction modes to the runtime. The chat driver handles interactive sessions, chore handles scheduled tasks, and talk handles agent communication. Active runs can also be steered, stopped, or canceled through the command line or runtime tools invoked by models.

With Toolang

You can:

  • Define agents in files, so they are easy to edit, version, share, and reuse.
  • Describe solutions to complex problems with flows, turning human know-how into executable workflows that models can follow and improve.
  • Use chat, chore, and talk to run tasks interactively, on a schedule, or collaboratively with multiple agents.
  • Customize chat, chore, and talk runnables to define how agents handle each type of task.