AI Architecture
AI features are powered by Anthropic's Claude. Most assistance runs inside the Next.js backend through a single AI client; a separate FastAPI agent service handles SEO content generation. Agents are records in an agent registry, and meaningful actions require human approval.
#Purpose
#Architecture
A single AI client module wraps Anthropic and is called from server-side logic (for example, sales, SEO, operations, and CEO helpers). There is no multi-provider abstraction.
Agents are rows in an agents table (department, type of director or specialist, system prompt, configuration, autonomy level, status). The registry is generic; seeded agents exist for some departments while others are Coming Soon.
A separate Python FastAPI agent service receives dispatched SEO generation jobs from the backend, authenticated by a shared internal secret.
#How it works
Invoke
Generate
Dispatch (SEO)
Approve
#Implementation notes
- Editing an agent's prompt, configuration, or autonomy is restricted to CEO/admin.
- The agent service exposes a health endpoint and an SEO generation router; it rejects requests without the shared secret.
- Seeded agents include CEO, Operations (with a Project Manager specialist), Sales, SEO (with Content Writer), and Customer Success (with a Support agent).
#Limitations
Known limitations
- Single AI provider (Anthropic); other providers are Planned, not wired.
- Marketing, HR, and Finance agents are Coming Soon (not seeded).
- AI drafts and recommends; it does not decide or act autonomously.
#Security considerations
Security
- The AI key and the agent-service secret are server-side only.
- AI operates within the assisting user's permissions.
- Never expose raw prompts containing secrets.
#Best practices
- Keep humans in the loop for anything consequential.
- Scope agent prompts with clear goals and constraints.
- Fact-check AI output before use.
#Related documentation
Still need help?
Can’t find what you’re looking for? The DevSphere OS team is happy to help.