A lightweight, multi-tenant framework for long-running AI agents. Contd.ai gives your workflows epistemic savepoints, hybrid recovery, and built-in cost tracking — so they survive failures and finish what they start.
Backed by research from
Performance degradation as context length grows beyond effective limits
Most requested feature: state management & memory for production agents
Agents need harnesses with context management to work indefinitely
Today's agent frameworks treat everything as a conversation. But real work isn't a chat — it's a series of discrete steps that need to survive failures, track costs, scale across sessions, and preserve reasoning over time.
As context windows fill with logs, retries, and history, reasoning quality degrades. Your agent gets dumber the longer it runs.
One timeout, one rate limit, one server restart — and hours of agent work vanishes. No checkpoint means starting over.
Without explicit state, agents lose track of constraints and objectives. They wander off-task or repeat work they've already done.
Contd.ai introduces a durable persistence layer between your agent and the LLM. Epistemic savepoints preserve both execution and reasoning state. Hybrid recovery combines snapshots with event replay for instant restoration. Your agent can crash, restart, and resume exactly where it left off.
Goals become task graphs. Each step is atomic, typed, and idempotent — with built-in deduplication and retry logic.
Each step runs with scoped context. A reasoning ledger tracks logic state so the LLM stays fresh and focused.
After each step, an epistemic savepoint captures execution state, reasoning context, and validated outputs.
Hybrid recovery loads the last snapshot and replays events to restore full state. No re-reading logs. No lost progress.
A layered architecture — SDK, core engine, API, and pluggable persistence — wrapped with enterprise features.
Preserve both execution state and reasoning logic at every step. Agents resume with full context of what they knew and why — not just where they stopped.
Fast restoration combining snapshots with event replay. Recover from crashes, timeouts, and rate limits in milliseconds — not minutes.
Integrated token counting and expense management per workflow, step, and tenant. Know exactly what each agent run costs before it finishes.
Built-in automatic retries and step deduplication. Every step is safe to re-execute — no duplicate side effects, no wasted compute.
Organization-level data isolation and execution scoping from day one. SSO, role-based access, and team management built in.
Store state in PostgreSQL, S3, or bring your own backend. The persistence layer is fully pluggable — deploy on our cloud or yours.
Use @workflow and @step decorators to make any agent resumable. We handle savepoints, serialization, and hybrid recovery automatically.
from contd import workflow, step
@workflow(name="data-pipeline")
async def process_data(items: list):
results = []
for i, item in enumerate(items):
@step(f"process-{i}")
async def run():
return await llm.process(item)
results.append(await run())
return results
# Crashes at item 47? Hybrid recovery
# restores from savepoint — not item 1.
# Cost: only the retry tokens.Join teams using Contd.ai to build durable, cost-aware AI workflows that survive the real world.