Skip to main content

OAT — On-demand Agent Tooling. LLMs synthesize and execute one-shot tools with mandatory human approval.

Project description

OAT — On-demand Agent Tooling

LLMs don't pick from a menu. They cook what they need.

CI PyPI MIT License Stars Python 3.11+

WebsiteDocsAgenticWork PlatformDiscussions


What is OAT?

OAT (On-demand Agent Tooling) lets LLMs synthesize tools on-the-fly instead of relying on pre-built tool libraries. You describe what you need in plain English. The LLM writes an async Python function, self-assesses risk, and presents it for your approval. You review the code and approve or deny. Approved tools execute in a sandbox and are discarded after use.

No MCP server to install. No schema to maintain. No tool registry to manage.


See it in action

Cloud LLM — AgenticWork API

OAT's default provider hits the AgenticWork platform's model router. No Anthropic key needed.

OAT synthesizing a tool via AgenticWork API

Self-hosted LLM — Ollama (air-gapped)

Point OAT at your own Ollama instance. Works behind firewalls, VPNs, fully disconnected networks.

OAT synthesizing a tool via Ollama on local hardware

Cloud infrastructure — GCP, AWS, Azure

Synthesize cloud tools using ambient credentials. No SDK install, no config files.

OAT synthesizing cloud infrastructure tools for GCP and AWS


How it works

Intent → Capabilities → LLM Synthesis → Human Approval → Sandbox Execution → Discard
  1. You describe what you want in natural language
  2. OAT resolves capabilities — which APIs, services, and credentials are available
  3. The LLM writes an async Python function tailored to your request, using only the capabilities you've enabled
  4. You review everything — the code, risk level, explanation, requested scopes — then approve or deny
  5. Approved tools execute in a sandbox with scoped credentials and a timeout
  6. Tools are discarded after use — no schema debt, no zombie tools, no tool registry bloat

The human-in-the-loop gate is mandatory and cannot be bypassed. Every synthesized tool is reviewed before execution.


Quick start

pip install oat-ai

CLI

# Default provider (AgenticWork API)
export AGENTICWORK_API_KEY=your-key
oat synth "list all S3 buckets in my AWS account"

# Dry run — see the synthesized code without executing
oat synth "get my AWS bill for this month" --dry-run

# Limit capabilities
oat synth "fetch the weather for NYC" -c http --dry-run

# Use Anthropic directly
oat synth "find open GitHub issues labeled bug" --provider anthropic

# Use Ollama on a remote server
oat synth "check disk usage" --provider ollama --base-url http://hal:11434 --model qwen2.5:32b

# Use AWS Bedrock
oat synth "list my EC2 instances" --provider bedrock

MCP Server (Claude Code integration)

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "oat": {
      "command": "oat",
      "args": ["mcp", "serve"],
      "env": {
        "SYNTH_PROVIDER": "agenticwork",
        "AGENTICWORK_API_KEY": "your-key"
      }
    }
  }
}

Claude Code can then synthesize and execute tools on demand through the MCP protocol.

Python library

import asyncio
from oats import CapabilityRegistry, Synthesizer, Executor, HITLGate
from oats.core.llm import create_llm_client
from oats.hitl.gate import CLIApprovalHandler

async def main():
    registry = CapabilityRegistry()
    registry.register_builtin("http", "github", "aws")

    client = create_llm_client("agenticwork", api_key="your-key")
    synthesizer = Synthesizer(llm_client=client, capability_registry=registry)
    tool = await synthesizer.synthesize("get my AWS costs for the last 7 days by service")

    gate = HITLGate(handler=CLIApprovalHandler())
    decision = await gate.submit_for_approval(tool)

    if decision.approved:
        output = await Executor().execute(tool)
        print(output.result)

asyncio.run(main())

Supported LLM providers

Provider Config Notes
AgenticWork (default) --provider agenticwork Platform model router, AGENTICWORK_API_KEY
Anthropic --provider anthropic Claude models, ANTHROPIC_API_KEY
AWS Bedrock --provider bedrock Claude on AWS, uses IAM credentials
Ollama --provider ollama --base-url http://host:11434 Local/self-hosted, any GGUF model
OpenAI-compatible --provider openai --base-url https://your-api.com vLLM, LocalAI, Azure OpenAI, etc.

Built-in capabilities

Capability What it provides
http HTTP requests to any API (httpx)
github GitHub REST API — repos, issues, PRs, notifications
slack Slack Web API — messages, channels, users
aws AWS via boto3 — S3, EC2, Lambda, Cost Explorer, CloudWatch
gcp Google Cloud — Storage, BigQuery, Compute, Billing
azure Azure — Blob Storage, Cosmos DB, Key Vault, Functions
filesystem Read/write local files (pathlib)
shell Run shell commands (async subprocess)
json Parse/transform JSON
datetime Date/time with timezone support
data Sort, filter, group, aggregate

Capabilities are defined in YAML. Add your own for internal APIs, databases, or any service:

capabilities:
  - name: myapi
    description: Access the internal Acme API for order management
    auth:
      type: bearer
      token_env_var: ACME_API_TOKEN
    allowed_domains:
      - api.acme.internal

What can OAT replace?

Instead of installing... Just say...
A GitHub MCP server oat synth "show my open PRs with failing CI"
An AWS cost tool oat synth "get AWS spending for the last 30 days by service"
A GCP storage client oat synth "list all GCS buckets and their sizes"
A Jira integration oat synth "find overdue tickets assigned to me"
A Slack bot oat synth "post deploy summary to #engineering"
A custom API wrapper oat synth "call the Acme API and list active orders"

AgenticWork Platform

OAT is the open-source engine behind the AgenticWork Platform. The platform adds:

  • One-click OAuth — connect GitHub, AWS, GCP, Azure, Slack, Jira through your browser
  • Credential vault — encrypted, scoped, auto-rotated tokens
  • Web approval UI — review and approve tools with one click
  • Server-side sandbox — isolated container execution on managed infra
  • Team access controls — role-based permissions across your org
  • Audit log — every synthesis, approval, and execution is recorded

Try the AgenticWork Platform →


Contributing

git clone https://github.com/agentic-work/oats.git
cd oats
pip install -e ".[dev]"

pytest                                    # Run tests
mypy oats/ --ignore-missing-imports       # Type check
ruff check oats/                          # Lint

All three must pass. See CONTRIBUTING.md for guidelines.


License

MIT — see LICENSE


OAT — On-demand Agent Tooling
The open-source engine behind AgenticWork

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oat_ai-0.6.0.tar.gz (4.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oat_ai-0.6.0-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

Details for the file oat_ai-0.6.0.tar.gz.

File metadata

  • Download URL: oat_ai-0.6.0.tar.gz
  • Upload date:
  • Size: 4.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for oat_ai-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9e89f524ad3615f7ed7f55ddd8597b19fc2f7f4e7efbb25cc377fd1165699d18
MD5 b024613b8bbde56e3260da260173edab
BLAKE2b-256 3f93c95c5553bcd3bd634b85083c05b5d72a84197ee8188190e243c1486c044a

See more details on using hashes here.

File details

Details for the file oat_ai-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: oat_ai-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 44.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for oat_ai-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ba8c72d8b7c1bfd961d1011774eebac9b4476077d048ac10708aae6c0418938
MD5 9a25005227f90aff2d8daf807bf89ee6
BLAKE2b-256 d8c31d817f5b4acd85fbcbf0ac4393775a1bec578dea8493d8f911850e80272e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page