Contracts and runtime helpers for Aware environments (agents, roles, rules, objects).
Project description
aware-environment
aware-environment is the shared contract that lets humans and agents work on
the same project surface. It defines the dataclasses, registries, renderers,
and runtime helpers that every Aware environment (kernel or otherwise) uses to
publish Agents, Roles, Rules, Objects, and supporting protocols. Concrete
environments extend these building blocks, but the core contract shipped here
is what the CLI, release pipeline, and terminal automation expect.
What ships in the package
- Typed specs & registries – immutable dataclasses describing agents, roles, rules, objects, and protocols plus registries for binding them to an environment.
- Environment container & loader –
Environment.empty()returns a sterile registry bundle;load_environment("module:get_environment")imports a factory and returns a fully bound environment. - Runtime executor –
ObjectExecutorturns registered object functions into plan-executing calls that emit filesystem receipts/journals used by aware-cli and the release pipeline. - Filesystem helpers –
OperationPlan, receipt encoders, and pathspec utilities ensure object handlers produce deterministic diffs. - Documentation renderers – constitution and environment guide renderers turn rule markdown into the human-facing guides consumed by AGENTS.md, CLAUDE overlays, and Studio panels.
- ACL & seeding helpers – utilities for modelling access control and generating the seed docs/panel manifests that environments expose.
Quick start
from aware_environment.agent.spec import AgentSpec
from aware_environment.environment import Environment
from aware_environment.object.spec import ObjectFunctionSpec, ObjectSpec
from aware_environment.role.spec import RoleSpec
from aware_environment.rule.spec import RuleSpec
from aware_environment.runtime.executor import FunctionCallRequest, ObjectExecutor
# Minimal constitution and role/agent wiring
env = Environment.empty()
env.bind_rules([
RuleSpec(id="00-environment", title="Environment Constitution", markdown="# Welcome to Aware")
])
env.set_constitution_rule("00-environment")
env.bind_roles([
RoleSpec(slug="environment-operator", title="Environment Operator", rule_ids=("00-environment",))
])
env.bind_agents([
AgentSpec(slug="codex", title="Codex", role_slugs=("environment-operator",))
])
def ping(environment: Environment, message: str) -> dict[str, str]:
return {"echo": message, "constitution": environment.get_constitution_rule().title}
env.bind_objects([
ObjectSpec(
type="hello",
description="Example object",
functions=(ObjectFunctionSpec(name="ping", handler_factory=lambda: ping),),
)
])
executor = ObjectExecutor(env)
request = FunctionCallRequest(
object_type="hello",
function_name="ping",
selectors={"agent": "codex"},
arguments={"message": "Aware!"},
)
result = executor.execute(request)
print(result.payload["echo"]) # -> "Aware!"
The same executor is what aware-cli uses under the hood when an agent runs
aware-cli object call.
Constitution-aware rendering
Environments can declare their governing rule with
Environment.set_constitution_rule("00-environment"). The renderer helpers
make it easy to surface that rule consistently:
render_constitution_summary(environment)→ markdown summary used in AGENTS.md and CLI overlays.render_environment_guide(environment, heading_level=1)→ full environment guide (roles, rules, objects) generated as part of release pipelines.
If the constitution rule is missing, the renderer raises so CI catches drift.
Integration points
- aware-cli loads the active environment with
load_environmentand routes every object/function call throughObjectExecutor, turning handler plans into receipts and journal entries. - Release/SDK pipelines stage panel manifests, AGENTS.md bundles, and manifest locks using the environment renderers, ensuring humans and agents see the same instructions.
- Custom environments can extend the base registries, add protocols, or
seed docs via
aware_environment.seedwhile reusing the same runtime and filesystem guarantees.
License
MIT © 2025 AWARE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aware_environment-0.1.3-py3-none-any.whl.
File metadata
- Download URL: aware_environment-0.1.3-py3-none-any.whl
- Upload date:
- Size: 51.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf1349634135408fddb80b2edbc7dfebe2ed20ff8bc313b775159ec84f72131
|
|
| MD5 |
7ddac7c776fc4ec785c70fca1f35a73f
|
|
| BLAKE2b-256 |
512626a90ae7064598b51cb36599936941234e72fea2390e19f7e7d5bcd11440
|
Provenance
The following attestation bundles were made for aware_environment-0.1.3-py3-none-any.whl:
Publisher:
publish-aware-environment.yml on aware-network/aware
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aware_environment-0.1.3-py3-none-any.whl -
Subject digest:
caf1349634135408fddb80b2edbc7dfebe2ed20ff8bc313b775159ec84f72131 - Sigstore transparency entry: 669412384
- Sigstore integration time:
-
Permalink:
aware-network/aware@8a29a099b57c5e013d59fa50cff64abc6935c45b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/aware-network
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-aware-environment.yml@8a29a099b57c5e013d59fa50cff64abc6935c45b -
Trigger Event:
workflow_dispatch
-
Statement type: