Skip to main content

autourgos-core

Framework: Autourgos Python License: Apache 2.0 Author Contributor Contributor

Typed core vocabulary for the Autourgos framework — Message, ToolSpec, ToolBinding, ToolCall, ToolResult, Action, Resource, Decision, Effect, RunState, Budget, ArtifactRef, and the structural protocols (LLMProvider, Capability, Policy, Middleware) that later Autourgos layers are written against.

from autourgos_core import Action, Resource, Risk

action = Action(tool="write_file", arguments={"path": "x"}, targets=[Resource("path", "x")], risk=Risk.WRITE)

Features

  • Zero required dependencies, same as autourgos-agent's own zero-dependency core
  • Conversation types: Message, ToolCall, ToolResult, ToolSpec, ToolBinding
  • Effects/safety types: Risk, Resource, Action, Decision, Effect — the shared vocabulary a policy engine, an audit log, and a capability package all agree on
  • Run state: Budget, ArtifactRef, RunState with to_dict()/from_dict() for lossless round-tripping
  • Structural protocols (typing.Protocol): an existing class satisfies these by shape, no import or subclassing required — LLMProvider, Capability, Policy, Middleware, ModelResponse

Table of Contents


Why This Exists

Every Autourgos package today communicates through plain dicts and duck typing — autourgos-agent's AgentLoopMixin reads its host object entirely through getattr(self, "x", default), and tool calls are {"action": ..., "action_input": ...} dicts with no shared type checked anywhere. That works, but it means every sibling package re-derives its own version of "what is a message" or "what is a tool result", and a misspelled attribute fails silently instead of at import or call time.

autourgos-core doesn't change any of that — it changes nothing about how autourgos-agent's Agent behaves today. It just gives later packages (a kernel, a policy engine, capability packages for filesystem/shell/desktop access) one shared vocabulary to build on, instead of three dialects of duck-typing.


Install

pip install autourgos-core

What's Here

Conversation types (autourgos_core.messages)

  • Message — one conversation turn (role, content, tool_calls, tool_call_id), with .to_dict() producing the OpenAI-compatible dict shape
  • ToolCall — one tool invocation (id, name, arguments)
  • ToolResult — the outcome of executing a ToolCall, with a real ok: bool instead of a stringly-typed "Error executing ..." convention
  • ToolSpec — a tool's schema/description, the part shown to the model
  • ToolBinding — a ToolSpec paired with its process-local callable; this is what Capability.tools() returns

Effects/safety types (autourgos_core.effects)

These describe "a tool is about to do something in the real world" — there is no policy engine in this package, just the shared shape one will use.

  • Risk — an enum from READ to IRREVERSIBLE
  • Resource — one thing an action touches (a path, a process, a network destination, ...)
  • Action — a tool call reframed as "here is what this would actually do"
  • Decision — a policy verdict (allow / confirm / rewrite / deny) on a proposed Action
  • Effect — the record of an Action that actually ran

Run state (autourgos_core.run)

  • Budget — ceilings on iterations, execution time, tokens, cost, and effect count
  • ArtifactRef — a pointer to something a run produced
  • RunState — the full serializable state of one agent run, with to_dict()/from_dict() for lossless round-tripping. This is a data shape only — no engine drives it in this package

Protocols (autourgos_core.protocols)

Structural (typing.Protocol) contracts — an existing class satisfies these by shape, without importing this module or changing a line.

  • LLMProvidercomplete(messages, tools, **kwargs) -> ModelResponse
  • Capability — a package of tools plus enough information (describe()) for a policy engine to reason about what each one touches
  • Policydecide(action, context) -> Decision
  • Middleware — the event-driven successor to autourgos-agent's CallbackHandler
  • ModelResponse — the normalized shape of one LLM call's result, regardless of provider or tool-calling mode

Relationship to the Rest of Autourgos

This package is the typed foundation for autourgos-kernel, autourgos-policy, and the OS-capability packages (autourgos-cap-fs, autourgos-cap-shell, autourgos-cap-desktop, autourgos-cap-web, autourgos-cap-mcp). autourgos-agent depends on it and re-exports its types, but its Agent class and loop are unchanged and don't require you to use them.


License

Apache License 2.0, Copyright (c) 2026 Jitin Kumar Sengar

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autourgos_core-0.2.1.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autourgos_core-0.2.1-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file autourgos_core-0.2.1.tar.gz.

File metadata

  • Download URL: autourgos_core-0.2.1.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for autourgos_core-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bbf821fd67a207cf99fb2a02849b4c5fbccb5a3a97c9c1cfca52fc8d94a0bb72
MD5 232b3369288b1df7e6eed305a1b49557
BLAKE2b-256 e776288620d6f638bf9041a9619213dbcbc5de1e095a17ffff85322ea7775683

See more details on using hashes here.

File details

Details for the file autourgos_core-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: autourgos_core-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for autourgos_core-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf54ce6d760eb1738d63285c90385b4df4457de07a3de3edfce07ccf935bb019
MD5 363dd54d5c57e821ea5544390c4bfb0f
BLAKE2b-256 0af3b735f04348f59c189d01c9e5d12bf093c938d4a9b796736d535e1e07f9bb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.11.0

2 files

0.10.0

2 files

This release

0.2.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page