All systems operational

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

Explain how AI is structured, executed, and kept under human control.

#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.

1
Backend logic
Calls the AI client.
2
Anthropic
Generates drafts/summaries.
3
Agent registry
Prompts & config per agent.
4
Human approval
Person reviews & decides.

#How it works

1

Invoke

Server logic calls the AI client with a prompt built from the agent's configuration and context.
2

Generate

Anthropic returns a draft, summary, or recommendation.
3

Dispatch (SEO)

SEO content generation is dispatched to the FastAPI agent service with the shared secret.
4

Approve

A person reviews AI output; meaningful actions pass through approval gates.

#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.

Still need help?

Can’t find what you’re looking for? The DevSphere OS team is happy to help.