Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Context Format (OCF)

Kill token growth. Build dramatically better agents.

Open Context Format — the open, token-efficient standard that unifies knowledge, tools, resources, and prompts into lightweight, git-friendly Markdown bundles.

Spec v0.1 Draft MCP compatible License: Open spec

Website · Read the spec · Try the example bundle · Report an issue


We are tackling the biggest bottleneck in production agents: token growth.

Frontier labs optimize for more tokens in the loop. We are the builders who ship agents — and we are fixing the economics of context.


The problem

Modern agent stacks burn context on:

Waste What it costs you
Verbose JSON tool schemas Every tool registered, every session — often before a single call
Repeated context Same definitions re-sent across turns and sub-agents
All-or-nothing discovery No progressive load; agents ingest what they will never use

Agents get expensive, slow, and hard to scale. Token growth is not a feature — it is the ceiling on useful autonomy.


The solution: OCF

OCF extends ideas from Google’s Open Knowledge Format (OKF) into one standard for knowledge and executable tools.

Everything is plain Markdown + YAML frontmatter. Agents read an index first, then load only the concepts they need.

flowchart LR
  A[Agent] --> B[index.md]
  B --> C{Need a tool?}
  C -->|Yes| D[One .md concept]
  C -->|No| E[Stop — minimal tokens]
  D --> F[Runtime / MCP adapter]
Loading

Typical outcome in discovery-heavy workflows: roughly 70–90% fewer tokens vs loading full MCP-style schemas for every tool up front — while keeping a clear path to MCP adapters and existing clients. (Measurement guidance in the spec →)


Proof: Business Calculator

A real tool concept — arithmetic, percentages, simple & compound interest, loan payments, ROI — not a toy one-liner.

Approach Tokens (approx., GPT-4o-style)
Traditional MCP tool definition 320–450+
OCF tool concept (this repo) 110–160

~70%+ savings on the definition alone, with Markdown humans can edit in a PR.

👉 Open the Business Calculator · Start at the bundle index

Bundle layout
examples/ocf-example-bundle/
├── index.md                 # Start here — progressive disclosure
├── META.yaml
├── tools/
│   ├── index.md
│   └── business_calculator.md
└── knowledge/
    └── index.md

Why builders switch from “MCP-only” authoring

MCP-heavy workflow OCF workflow
Pay schema cost for all tools up front Pay ~20–40 tokens per index entry; load tools on demand
JSON Schema as the source of truth Natural language + examples; JSON Schema optional when you need strict validation
Tool defs live in server code Git-diffable bundles your team can review

Session-scale rule of thumb (from the spec): ~8 tools, ~3 selective calls — MCP-style upfront definitions often 2,800–4,000+ tokens; OCF selective loading often 400–700. Your tokenizer and agent loop will differ — benchmark it.


Key benefits

  • Radical token efficiency — Load only what you need; forget what you loaded.
  • Human + agent native — One format your team and your model both read.
  • Git-friendly & portable — No vendor lock-in; fork, version, and share bundles.
  • MCP compatible — Project OCF tools into tools/list via an adapter (§8).
  • Open by design — Draft spec, reference bundle, room for validators and runtimes on the roadmap.

Get started

git clone https://github.com/Ashvinnaik/OCF.git
cd OCF

Explore

Resource Link
Specification (v0.1 draft) OCF_Spec_v0.1.md
Examples examples/ocf-example-bundle/
Token targets & benchmarks Spec §5 — Performance & tokens
MCP compatibility Spec §8 — MCP adapter

Three-minute agent test: Point your agent at examples/ocf-example-bundle/index.md. Ask it to use the Business Calculator without pasting your full MCP tools/list. Compare context size.


Join the movement

We are outsiders solving the token problem incumbents will not prioritize.

  • Star this repo — it signals demand for efficient agent standards.
  • 🛠 Contribute tools, bundle examples, spec clarifications, or adapter designs via Issues and PRs.
  • 🐦 Follow updates on X: @ashvinn

Let’s make AI agents efficient again.


OCF — Efficiency first. Open always.

Status: v0.1 draft for community review · Contributions welcome

About

Open Context Format — vendor-neutral, token-efficient Markdown bundles for agent tools and knowledge; draft spec v0.1 with MCP adapter path.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors