User Guides¶
Practical, task-oriented guides for building with apcore in Python, TypeScript, and Rust.
The guides are arranged as a learning path. Read the Foundations in order, then pick the Governance and Integration topics that match your project. Cookbooks are short end-to-end recipes for one scenario each; Troubleshooting is where to go when something does not behave as expected.
Foundations¶
- Creating Modules — Class-based modules,
module()registration, and YAML bindings for existing code - Schema Definition — Declaring input/output schemas, constraints, and LLM extension fields
- Testing Modules — Unit, schema, and integration tests for modules
Governance¶
- ACL Configuration — Access control rules, audit logging, and ACL testing
- Writing Middleware — Adding before/after/on_error hooks around module calls
Integration¶
-
Runtime Profiles — Assemble the in-memory or full runtime and migrate host integrations
-
Python Golden Path — Register an existing function and verify the same governance from Python and MCP
- Multi-Language — Sharing schemas and module IDs across the Python, TypeScript, and Rust SDKs
- Adapter Development — Exposing modules through a web framework
- Integrating Existing Projects — Adopting apcore in an application that already has request and correlation IDs
Cookbooks¶
End-to-end recipes for one scenario each. They link to the feature specifications rather than restating them.
| Recipe | What it covers |
|---|---|
| Approval Flow | Gating a module behind a human decision with an ApprovalHandler |
| Cancellation | Cooperative cancellation of long-running modules via the context's cancel token |
| Streaming | Producing and consuming incremental output with stream() |
| Observability | Tracing, structured logging, and redaction of sensitive fields |
Troubleshooting¶
- Troubleshooting — Frequently asked questions, an error-code → cause → fix table, and diagnostic commands
Learning Path¶
- Foundations: Start with Creating Modules and Schema Definition.
- Quality: Read Testing Modules before moving to production.
- Governance: Set up ACL Configuration and learn Writing Middleware.
- Integration: Pick the Integration topics that match your stack.
- Real-world: Use the Cookbooks for specific scenarios.
Before reading these guides, read the Core Concepts; for interface details, see the Feature Specifications.