Your agent runs as a Python subprocess spawned per invocation. The daemon sends it one request, the agent handles it and exits. Here’s what that means in practice. What this gives you:Documentation Index
Fetch the complete documentation index at: https://docs.hellofriday.ai/llms.txt
Use this file to discover all available pages before exploring further.
- No API keys in your code - Friday manages providers and authentication
- Secure external access - HTTP and tools route through Friday’s audited channels
- Simple development - write a Python file, register it, it runs immediately
- No dependency conflicts -
pip installadditional pure-Python packages into the agent environment
- Write normal Python using the
@agentdecorator andexecute()function - Access the outside world through
ctx.llm,ctx.http,ctx.tools,ctx.stream - Register with the daemon - no restart required
Execution model
Each invocation spawns a fresh process. The daemon sends one message, the agent handles it, returns a result, and exits. State does not persist between calls - if you need to store state, write to memory via MCP tools or return it in the result.agent.py
if __name__ == "__main__": run() block is required - it’s how the subprocess connects to the daemon.
Host capabilities
Your agent calls Friday for any external interaction:| Capability | What you use it for | Why Friday handles it |
|---|---|---|
ctx.llm | Generate text or structured data | API keys, rate limits, provider routing |
ctx.http | Call external APIs | TLS, timeouts, audit logging |
ctx.tools | Invoke MCP servers | External processes run outside the agent |
ctx.stream | Show progress in the UI | Real-time updates to connected clients |
ctx.env | Read configured secrets | No host environment access from the subprocess |
ctx for production work. This keeps credentials out of your code, enables audit logging, and lets Friday handle rate limits and provider routing. You can install requests or anthropic directly for local debugging, but host capabilities are preferred for anything that runs in a space.
Registration
Register an agent from anywhere on your machine:FRIDAY_VALIDATE_ID, reads metadata via NATS), copies all source files from the same directory to the Friday home directory under agents/{id}@{version}/, and hot-reloads the registry. No daemon restart required.
Once registered, reference the agent by ID in workspace.yml:
workspace.yml
Current constraints
Dependencies- The
friday_agent_sdkand Python standard library are available by default - You can
pip installadditional packages - native C extensions (NumPy, Pydantic) work if the environment has them - All I/O should still route through
ctx.llm,ctx.http,ctx.toolsfor audit logging and credential management
- Every invocation is a fresh process - module-level state resets each time
- Persist through MCP tools or return data in
ok()
- One
@agentdecorator per Python file. A second raisesRuntimeError. Split into separate files.
Iteration workflow
Edit your agent source and re-register:See also
Quickstart
Step-by-step walkthrough of building your first agent.
Python reference
Complete API documentation for the SDK.

