Skip to main content
This page is for contributors changing the AFK framework. If you are building an application with AFK, start with Quickstart or Building with AI.

Local setup

AFK targets Python 3.13+.
Common commands:
Preview docs:
Regenerate agent-facing docs and skill indexes:
Install the repository skills with Vercel’s Skills CLI:
Use afk-coder when building with AFK. Use afk-maintainer when reviewing or changing AFK itself.

Repository boundaries

Keep the Agent/Runner/Runtime boundary intact:
  • agents are configuration;
  • runners execute;
  • tools, memory, queues, LLM adapters, and telemetry provide runtime capabilities.

Change workflow

  1. Identify the public contract affected by the change.
  2. Inspect the existing module and tests before editing.
  3. Make the smallest behavior change that preserves package boundaries.
  4. Add or update focused tests for success and failure paths.
  5. Update docs when behavior, public imports, configuration, env vars, or examples change.
  6. Regenerate agent-facing docs when docs navigation, snippets, or skill metadata change.

Documentation workflow

User-facing docs must:
  • import from public package surfaces such as afk.agents and afk.core;
  • explain behavior before internals;
  • use Python 3.13+ guidance;
  • distinguish afk-py distribution install from afk imports;
  • include new pages in docs/docs.json;
  • keep examples aligned with current AgentResult, RunnerConfig, and FailSafeConfig fields.
Maintainer docs may reference internal files, but should state which public contract or invariant is being protected.

High-risk areas

Use targeted tests when touching:

Public API checklist

Before changing exports or constructor fields:
  • update package-level __all__;
  • update API Reference;
  • update Configuration Reference if defaults changed;
  • update snippets that use the changed field;
  • add public-import tests where useful.

Next steps

Architecture

Package boundaries and runtime flow.

Public API Rules

Maintainer rules for stable imports and docs examples.

Tested Behaviors

Behaviors that tests protect.

Full Module Reference

Generated source-level symbol map.