Documentation

Contd.ai Documentation

Build durable AI workflows that never lose their way. Contd.ai provides the deterministic "Save State" engine that prevents Context Rot and ensures your agents survive failures.

What is Contd.ai?

Contd.ai is a Continuity Layer for Enterprise AI that solves the fundamental problem of long-running AI agents: Context Rot.

As AI agents execute complex, multi-step workflows, they accumulate context that degrades their reasoning ability. Contd.ai separates Intelligence from Execution, ensuring your LLM stays "fresh" at step 100 because we only feed it the exact snapshot it needs.

Key Features

Durable Execution

Workflows survive infrastructure failures, API timeouts, and server restarts. Never lose progress again.

Serialized State

Work is treated as typed objects in a rigid state machine, not messy chat history.

Deterministic Resumption

If a process dies, Contd.ai reloads the last valid checkpoint instantly.

Full Auditability

Every decision is backed by an immutable, append-only ledger for compliance.

Quick Example

example.py
from contd import Client, workflow, step

client = Client(api_key="your-api-key")

@workflow
async def ai_support_agent(ctx):
    # Each step is checkpointed automatically
    intent = await ctx.run(classify_intent, ctx.input["message"])
    context = await ctx.run(retrieve_context, intent)
    response = await ctx.run(generate_response, context)
    return await ctx.run(validate_output, response)

# Register and trigger
client.register(ai_support_agent)
run = await client.trigger("ai_support_agent", {"message": "Help me!"})

# If this crashes, it resumes from the last completed step
print(f"Run ID: {run.id}, Status: {run.status}")

Next Steps