This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Use
uvfor dependency management - Run
./scripts/bootstrapto set up the environment - Or use
uv sync --all-groupsdirectly
Special note: the individual tutorials maintain their own tutorial specific virtualenv using uv. So when testing/running tutorials, you uv run instead of the top-level scripts. Everything else is similar.
- Run tests:
uv run pytestor./scripts/test - Run specific test:
uv run pytest path/to/test_file.py::TestClass::test_method -v - Mock server is automatically started for tests, runs on port 4010
- Format code:
uv run ruff formator./scripts/format- The repository is still in flux, so running format might accidentally change files that aren't part of your scope of changes. So always run
uv run ruff formatwith additional arguments to constrain the formatting to the files that you are modifying.
- The repository is still in flux, so running format might accidentally change files that aren't part of your scope of changes. So always run
- Lint code:
uv run ruff check .or./scripts/lint - Type check:
uv run pyright
- Build package:
uv build
The package provides the agentex CLI with these main commands:
agentex agents- Get, list, run, build, and deploy agentsagentex tasks- Get, list, and delete tasksagentex secrets- Sync, get, list, and delete secretsagentex uv- UV wrapper with AgentEx-specific enhancementsagentex init- Initialize new agent projects
- Run agents:
agentex agents run --manifest manifest.yaml - Debug agents:
agentex agents run --manifest manifest.yaml --debug-worker - Debug with custom port:
agentex agents run --manifest manifest.yaml --debug-worker --debug-port 5679
/src/agentex/- Core SDK and generated API client code/src/agentex/lib/- Custom library code (not modified by code generator)/cli/- Command-line interface implementation/core/- Core services, adapters, and temporal workflows/sdk/- SDK utilities and FastACP implementation/types/- Custom type definitions/utils/- Utility functions
/examples/- Example implementations and tutorials/tests/- Test suites
SDK Architecture:
- Client Layer: HTTP client for AgentEx API (
_client.py,resources/) - CLI Layer: Typer-based command interface (
lib/cli/) - Core Services: Temporal workflows, adapters, and services (
lib/core/) - FastACP: Fast Agent Communication Protocol implementation (
lib/sdk/fastacp/) - State Machine: Workflow state management (
lib/sdk/state_machine/)
Temporal Integration:
- Workflow definitions in
lib/core/temporal/ - Activity definitions for different providers
- Worker implementations for running temporal workflows
Agent Framework:
- Manifest-driven agent configuration
- Support for multiple agent types (sync, temporal-based)
- Debugging support with VS Code integration
Most SDK code is auto-generated. Manual changes are preserved in:
src/agentex/lib/directoryexamples/directory- Merge conflicts may occur between manual patches and generator changes
temporalio- Temporal workflow enginetyper- CLI frameworkpydantic- Data validationhttpx- HTTP clientfastapi- Web frameworkruff- Linting and formattingpytest- Testing framework
- Python 3.12+ required
- Uses uv for dependency management
- Supports both sync and async client patterns