Edictum
Edictum Control Plane

Connecting Agents

Connect Python, TypeScript, or Go agents to the hosted Edictum control plane.

AI Assistance

Right page if: you need the current server-backed agent connection path for Python, TypeScript, or Go. Wrong page if: you only need local YAML rulesets -- see https://docs.edictum.ai/docs/quickstart. Gotcha: Python and Go support server-assigned mode; the current TypeScript server package requires an explicit bundleName on the canonical /v1 API.

Connect agents to the hosted control plane when you want:

  • remote ruleset delivery
  • live ruleset updates over SSE
  • central approval records
  • shared session state
  • workspace event and audit visibility

Install

pip install edictum[yaml,server]
pnpm add @edictum/core @edictum/server js-yaml
go get github.com/edictum-ai/edictum-go/server

Current Endpoints Used by SDKs

  • rulesets: GET /v1/rulesets/{name}/current
  • ruleset/events stream: GET /v1/stream
  • decision events: POST /v1/events
  • approvals: /v1/approvals
  • session state: /v1/sessions/*

Python

from edictum import Edictum

guard = await Edictum.from_server(
    url="https://api.edictum.ai",
    api_key="edk_...",
    agent_id="docs-agent",
    env="production",
    bundle_name="production-rules",
)

Notes:

  • bundle_name=None is still valid for Python server-assigned mode
  • allow_insecure=True is only for non-loopback HTTP during development
  • verify_signatures=True requires signing_public_key

TypeScript

import { createServerGuard } from '@edictum/server'

const { guard, close } = await createServerGuard({
  url: 'https://api.edictum.ai',
  apiKey: 'edk_...',
  agentId: 'docs-agent',
  environment: 'production',
  bundleName: 'production-rules',
})

Notes:

  • the current TypeScript server package requires bundleName
  • the package is @edictum/server
  • createServerGuard() returns { guard, client, close }
  • call close() on shutdown to flush audit events and stop the watcher

Go

guard, err := server.FromServer(server.Config{
    URL:     "https://api.edictum.ai",
    APIKey:  "edk_...",
    AgentID: "docs-agent",
    Env:     "production",
    Bundle:  "production-rules",
})

TLS Rules

  • remote hosts should use HTTPS
  • loopback HTTP is fine for local development
  • do not send workspace API keys over plaintext remote HTTP

What Happens After Connect

  1. the agent fetches its current ruleset
  2. the SDK opens GET /v1/stream
  3. the SDK posts decision events to POST /v1/events
  4. approvals and session state use the same v1 API surface
  5. the app reflects that workspace data in /runs, /events, /audit, /agents, and /approvals

Last updated on

On this page