Agent-Readable Documentation

For AI Agents

This page is designed for AI Agents. Everything below is available as structured JSON. You can build a complete TLL OS application without reading any source code — only through these public endpoints.

How to Use TLL OS as an Agent

Follow these steps to understand, develop, and operate TLL OS applications.

1

Discover the Protocol

Read /agent/index.json to discover all available structured resources. Then read /agent/protocol.json to understand Protocol 2.0.

2

Learn the Contracts

Read /agent/contracts.json for all 17 core contracts with their TypeScript interfaces, status, and usage examples.

3

Study Examples

Read /agent/examples.json for verified, tested examples. Each includes the full source code, test results, and Graph structure.

4

Discover Capabilities

Read /agent/capabilities.json to discover available modules, plugins, adapters, and their capabilities in the TLL OS ecosystem.

5

Build Your Application

Use the TLL OS Public Contract (createTllOS()) to create applications, modules, APIs, tools, agents, and tests. Never import internal implementations.

6

Propose Improvements

Read /agent/evolution.json to learn the TEP process. Found a bug or want a new contract? Submit an Evolution Proposal.

Structured Endpoints

All machine-readable resources. Fetch these as JSON.

GET/agent/index.json
Entry point — lists all structured resources with descriptions and URLs
GET/agent/protocol.json
Protocol 2.0 specification — principles, models, contracts, versioning
GET/agent/contracts.json
17 core contracts — name, model, status, interface summary, key methods
GET/agent/capabilities.json
Capability registry — available capabilities, providers, ecosystem map
GET/agent/examples.json
Verified examples — description, source, Graph structure, test results
GET/agent/evolution.json
TEP process — proposal structure, status flow, AI review checklist, active proposals

Agent Development Contract

The only import you need. Everything goes through the public contract.

agent-entry.ts
// ✅ CORRECT: Only import the public contract
import { createTllOS } from '@tll/os/public';

// ❌ WRONG: Never import internal implementations
// import { Kernel } from '@tll/os/core/kernel';
// import { ApiManager } from '@tll/os/core/api';

// Create a TLL OS application
const app = createTllOS();

// Register a module
const module = app.registerModule({
  name: 'my-module',
  version: '1.0.0',
  description: 'My first TLL OS module'
});

// Create an API endpoint
module.registerApi({
  method: 'GET',
  path: '/api/hello',
  handler: async (req) => ({ message: 'Hello, Agent!' })
});

// Create a Tool for Agents
module.registerTool({
  name: 'greet',
  description: 'Greet a user by name',
  parameters: { name: { type: 'string', required: true } },
  execute: async (params) => ({ greeting: `Hello, ${params.name}!` })
});

// Read the Application Graph
const graph = app.getGraph();
console.log(`Nodes: ${graph.listNodes().length}`);
console.log(`Edges: ${graph.listEdges().length}`);

// Run tests
const results = await app.runTests();
console.log(`${results.passed}/${results.total} passed`);

Agent Verification Checklist

Before claiming you understand TLL OS, verify you can do all of these:

✓ Read Graph

Can you fetch and parse the Application Graph of an existing application?

✓ Create Module

Can you register a new module with routes, services, and tests?

✓ Create API

Can you create REST API endpoints with path parameters and validation?

✓ Create Tool

Can you create an Agent-callable Tool with parameter schemas?

✓ Create Agent

Can you create an Agent that uses Tools to accomplish tasks?

✓ Run Tests

Can you write and execute tests, then interpret failures?

✓ Fix Bugs

Can you diagnose a test failure, fix the code, and re-run?

✓ Propose TEP

Can you identify a protocol gap and draft an Evolution Proposal?