AI and Agents API (Python)
The MCP-over-HTTP interface for creating and calling agents, running chat sessions, and reading agent and prompt configuration.
The AI and Agents API is the Python service that drives the agentic side of DevJock. It speaks MCP over HTTP, so you can call it from an MCP client or from any code that can send authenticated HTTP requests. It is one of three DevJock APIs; the Task API (PHP) covers the issue tracker and the App API serves the front end.
What it does
The API groups into a few capability areas:
- Agents: create agents (a versioned prompt plus a model choice), call them, and override the model per call or inherit the platform default.
- Chat sessions: start, resume, and drive persistent named sessions, link them to tasks, and toggle between customer-facing and internal context.
- Prompts and skills: where exposed, work with the prompt bodies and skills that agents draw on. Check the live reference for the operations available.
- Management reads: read an agent's live configuration and the body of a prompt. These reads are useful for config-drift detection, comparing what is deployed against what you expect in source control.
Authentication
The API uses OAuth bearer authentication. Send the access token in the Authorization header on every request. Follow the token lifecycle and refresh flow described in the live interactive reference, and handle token renewal in your client so long-running agents do not lose access mid-run.
Endpoints and reference
Do not hard-code endpoint paths from memory. The live interactive reference lists every operation, its parameters, and current request and response shapes. Open it from the app's user menu, where each of the three APIs has its own reference.