Start here · Responsibility boundary
Reuse the runtime. Keep the product.
Heddle owns reusable agent mechanics. Your product remains the authority for users, data, policy, deployment, transport, and experience.
Customization depth
Applies at every customization level
Hosting depth
Applies at every hosting level
Documentation status
Canonical reference
- Messages, turns, continuation, compaction, leases, and persisted session behavior
- Model/tool execution, approval lifecycle, traces, semantic activity, and artifacts
- Optional run identity, ordered sequences, replay, cancellation, terminals, and remote envelope validation
- Authenticated identity, tenant scope, access rules, and product relationships
- Domain tools, system context, credentials, public schemas, retention, encryption, and backup
- API framework, transport, routing, rate limits, deployment, UI state, and result application
Dependency direction
YOUR PRODUCT
UI state and result application
|
remote consumer + optional HTTP/SSE client
|
your transport, authentication, and public schemas
|
your application service and composition root
======================= HEDDLE SDK =======================
ConversationRunService
run identity, ordered activity, replay, cancel, approvals
|
ConversationEngine
sessions, turns, compaction, traces, artifacts
|
models, tools, host extensions, MCPKeep dependencies pointing downward. A transport-neutral application service should not read an HTTP request, and Heddle core should not know which frontend renders the result.
Complete responsibility split
| Concern | Heddle owns | Your product owns |
|---|---|---|
| Conversation | Messages, turns, continuation, compaction, leases, persisted behavior | Stable product conversation ID, relationships, access rules |
| Execution | Model/tool loop, registration, host extensions, traces, artifacts | Domain tools, context, model choice, credentials, capability policy |
| Approvals | Request and resolution lifecycle | Whether an action is allowed, authenticated approver, policy and UI |
| Active runs | Run ID, ordered sequence, bounded replay, cancellation, terminal settlement | Address scope, process lifetime, routing, draining, distributed delivery |
| Remote client | Envelope validation, cursor rules, duplicate/gap handling, terminal detection | Public fields, timers, UI state, retry UX, notifications, result presentation |
| Persistence | Local defaults and injectable session/artifact ports | Production adapters, tenant binding, retention, encryption, backup |
| API and UI | Optional transport mechanics | Framework, routes, authorization, CORS, limits, errors, every visual decision |
Avoid duplicate runtime behavior
Do not add a second implementation of mechanics Heddle already owns:
- Do not replay the product's complete chat history into every new prompt. Reuse the same Heddle session ID.
- Do not create a second host-side run ID for the same active Heddle run.
- Do not add another in-process event bus above
ConversationRunService. - Do not treat one subscriber disconnect as cancellation of the underlying run.
- Do not parse rendered assistant text to recover structured failures or tool results.
- Do not expose internal traces, tool inputs, paths, or provider errors without an explicit public projection.
Before implementation
Write down these host decisions:
- Which server framework and transport already exist?
- How are identity and tenant scope authenticated?
- Which stable product ID maps to a Heddle conversation?
- Which UI/state layer consumes run events?
- Can one process own an active run for its lifetime?
- Which repositories, approval policy, tools, and telemetry are production requirements?
Then select the lowest matching layer and copy only the example stages whose assumptions match.
Continue to Build your first agent, or go directly to Hosting overview when your product already owns its conversation UI.