Skip to main content

constaia

constaia is a configuration-as-code toolkit for building, validating, and deploying typed configuration objects for AI agents and LLM applications. It lets you declare agent prompts, model parameters, tool schemas, and runtime policies as versioned Config objects that are validated against a schema before they reach production. It is designed for teams shipping generative features who need reproducible agent behavior, change review, and rollback without hand-editing YAML.

Configs are serialisable to JSON, diffable across versions, and can be exported to the Constaia control plane for deployment tracking.

Features

  • Declarative Config and Agent classes with field validation, defaults, and deprecation warnings.
  • Compose reusable Prompt, ToolSpec, and ModelProfile objects and reference them across multiple agents.
  • Validate every config against its JSON schema with constaia.validate() before deployment; failures raise ConfigError with a precise field path.
  • Diff two config versions with constaia.diff() and emit a human-readable changelog for review.
  • Export configs to JSON, YAML, or the Constaia platform; load them back with constaia.load().
  • Built-in profiles for OpenAI, Anthropic, and open-weight model families with sane parameter defaults.
  • Lock a config to a semantic version and pin model IDs for reproducible agent runs.

Installation

pip install "constaia~=0.2.0"

Quick start

from constaia import Config, Agent, ModelProfile, ToolSpec

profile = ModelProfile(provider="openai", model="gpt-4o-mini", temperature=0.2)

lookup = ToolSpec(
    name="lookup_order",
    description="Fetch an order by ID.",
    parameters={"order_id": {"type": "string", "required": True}},
)

agent = Agent(
    name="support-triage",
    system_prompt="Triage incoming tickets and route by urgency.",
    model=profile,
    tools=[lookup],
)

config = Config(agents=[agent], version="1.4.0")
constaia.validate(config)

print(constaia.diff(prev_config, config))  # human-readable changelog
constaia.deploy(config)  # push to the Constaia platform

API

  • Config(*, agents: list[Agent], version: str) -> Config — root config object; serialise with .to_json() / .to_yaml().
  • Agent(name, system_prompt, model, tools=None) — a single agent definition with model profile and tools.
  • constaia.validate(config: Config) -> None — schema-validates a config; raises ConfigError on violations.
  • constaia.diff(a: Config, b: Config) -> str — returns a structured changelog between two config versions.
  • constaia.load(source: str | Path) -> Config — loads a config from a JSON/YAML file or platform URL.

Configuration

  • CONSTAIA_API_TOKEN — token used by constaia.deploy() and constaia.load() to talk to the Constaia platform.
  • CONSTAIA_PROFILE — one of openai, anthropic, oss to scope the default model profiles.

License

MIT

Metadata

Release files for constaia 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for constaia 0.1.0
File Size Uploaded Provenance Actions
constaia-0.1.0.tar.gz 6.0 kB Without provenance Details for constaia-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for constaia 0.1.0
File Interpreter ABI Platform Actions
constaia-0.1.0-py3-none-any.whl Python 3 none any Details for constaia-0.1.0-py3-none-any.whl

Total release size: 12.7 kB

Release files / constaia-0.1.0.tar.gz

Download URL constaia-0.1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7434c1156b428332134979c542f3115fd967f321de09a6a582783dcad3b14f91
BLAKE2b-256 checksum
How to use checksums
fc869e79a8e13b59fd32f91fb7e9da2bae33e4aca62d5af5c5afeba478ee6eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / constaia-0.1.0-py3-none-any.whl

Download URL constaia-0.1.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a02cd47af27ff7d31b2ff8a0ea948e24f15738da32aea64b7bf4f8613ce305d7
BLAKE2b-256 checksum
How to use checksums
1c9becc81ffc9c5212e3f4ee434fae87e5ea1e1af3653cbd4dd7927c60b21f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for constaia 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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