AgentRail is API-first. Contributions should start with the contract, then implementation, then SDK/docs updates.
cp .env.example .env
npm startRun the deterministic lifecycle demo:
npm run demoRun tests:
npm testCheck types:
npm run typecheckRequires Node ≥22.6. The service runs directly from src/ — no build step needed.
- Keep public API changes backward-compatible.
- Add request and response examples for new OpenAPI endpoints.
- Use idempotency keys for mutating operations.
- Prefer push delivery over polling.
- Keep responses compact and shaped for agent context windows.
- Add happy-path tests for code changes and integration tests for endpoint behavior.
- Do not commit generated folders such as
node_modules,dist,__pycache__, or IDE metadata.
- Update
docs/api/task-lifecycle.openapi.yaml. - Document the tradeoff in the pull request or issue comment when the decision affects agent behavior, schema evolution, auth, or deployment risk.
- Update server routes and adapters.
- Update TypeScript and Python SDK surfaces.
- Add or update tests and examples.
Keep dependencies minimal. New runtime dependencies need a short justification in the pull request: why the standard library or existing code is insufficient, what the maintenance risk is, and how the dependency affects local setup.
Do not put secrets in code, docs, examples, or issue comments. Use local placeholder values in examples and document real secret handling in operational docs only.