Metadata-Version: 2.5
Name: elan-agentkit-contracts
Version: 0.1.1
Summary: The wire models, manifest schema and deploy spec the Elan SDK and CLI share with the platform
Project-URL: Homepage, https://openelan.ai
Project-URL: Documentation, https://openelan.ai/app/docs
Author-email: Elan <support@openelan.ai>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: adk,agent-platform,agents,contracts,llm
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.9
Requires-Dist: pyyaml>=6.0
Description-Content-Type: text/markdown

# elan-agentkit-contracts

The models the Elan platform and its clients both read: the event envelopes, the
agent manifest, the `elan.yaml` deploy spec, the artifact scope vocabulary and
the naming rules every derived identifier follows.

You almost certainly do not need to install this directly. `elan-sdk` and
`elan-cli` depend on it, and installing either brings it along.

```bash
uv add elan-agentkit-contracts
```

Requires Python 3.12 or newer. Its only dependencies are `pydantic` and
`pyyaml`.

## Why it is a separate package

The SDK validates an artifact filename before asking for an upload ticket, and
the CLI's `elan validate` answers the same question the deploy service will.
Both are only worth anything while there is **one** copy of each rule — a client
that reimplements a predicate passes its own tests against its own copy, and
nothing compares the copies.

So these modules are shared rather than mirrored. What is *not* shared is
everything that verifies, mints or connects: the token verifiers, the ticket
minter, the database layer, the broker and the push transports stay in the
platform's own package. A client has no business holding a verifier, and your
application image has no business carrying a Pub/Sub SDK.

## What is in it

| Module | What it holds |
|---|---|
| `envelopes` | `AgentEventEnvelope`, `InvocationEnvelope`, `ResumeEnvelope`, `EventKind` |
| `manifest` | `AgentManifest`, `WorkflowManifest`, `ActionPolicy`, `Rule`, `Billing`, `Limits` |
| `deploy_spec` | `DeploySpec`, `spec_from_yaml`, `cross_check`, `Problem` |
| `identity` | slug rules and every name derived from `(tenant, project, agent)` |
| `artifacts` | the four artifact scopes, and what a filename may say |
| `pricing` | the price grammar and tier arithmetic |
| `tickets` | `TICKET_ISSUER`, `TICKET_QUERY_PARAM`, `stream_url` |
| `subjects` | `END_USER_PREFIX`, `TENANT_SCOPE`, `end_user_of` |
| `oauth` | `token_scope` — the one non-standard part of an OAuth request here |
| `templates` | what `elan new agent` scaffolds |

## Stability

Pre-1.0 and versioned with the rest of the platform's client packages. These are
wire contracts, so a field is added far more often than one changes meaning;
when one does, it goes in the changelog with the version that introduced it.

## Documentation

<https://openelan.ai/app/docs>

## Licence

Apache-2.0. See `LICENSE`.
