> For the complete documentation index, see [llms.txt](https://synthesise-ai.gitbook.io/synthesise-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://synthesise-ai.gitbook.io/synthesise-ai/core-modules/ai-agents.md).

# AI Agents

AI Agents in Synthesise are autonomous modules trained to complete specific strategic, operational, or creative functions in the product development lifecycle. While chatbots focus on reactive conversation, agents proactively generate, analyze, and optimize.

These agents operate within flows, execute independently or as part of teams, and communicate via internal protocols.

***

#### 1. Agent Architecture

Each agent is made up of:

* **Purpose** – the specific outcome it’s optimized for (e.g., SEO, pricing, UX)
* **Model** – the underlying LLM or ruleset (GPT-4, Claude, or fine-tuned local models)
* **Memory** – local session context plus shared product knowledge
* **Interface** – a unified `Agent` trait implemented across all agents

```rust
pub trait Agent {
    fn name(&self) -> &str;
    fn execute(&self, input: &str) -> String;
}
```

***

#### 2. Available Agents

| Agent                 | Description                                                     |
| --------------------- | --------------------------------------------------------------- |
| **TutorAgent**        | Generates educational outlines, assessments, and learning flows |
| **SEOAgent**          | Produces search-optimized titles, meta tags, alt text           |
| **UXAuditAgent**      | Evaluates module structure and friction points                  |
| **MonetizationAgent** | Recommends pricing tiers, upsell logic, and access paths        |

Example:

```rust
pub struct SEOAgent;

impl Agent for SEOAgent {
    fn name(&self) -> &str {
        "SEOAgent"
    }

    fn execute(&self, input: &str) -> String {
        format!("SEO tags for '{}': future, disruption, AI", input)
    }
}
```

***

#### 3. Agent Lifecycle

1. **Invocation**\
   Triggered by user flow (e.g. creating a new module) or other agents
2. **Prompt Assembly**\
   Combines charter + user context + input for LLM inference
3. **Execution**\
   Outputs are streamed or completed depending on use case
4. **Logging & Feedback**\
   Outputs are saved to session memory and rated for accuracy
5. **Replay/Mutation**\
   Outputs can be forked or regenerated with new parameters

***

#### 4. Multi-Agent Collaboration

Agents can interact in swarm-style flows using a shared product state. For example:

```rust
let agents: Vec<Box<dyn Agent>> = vec![
    Box::new(SEOAgent),
    Box::new(MonetizationAgent),
];

for agent in agents {
    println!("{}: {}", agent.name(), agent.execute("digital product"));
}
```

This enables compound outputs: SEOAgent might propose the headline, MonetizationAgent adjusts pricing based on that.

***

#### 5. Custom Agent Creation (Pro Feature)

Pro users will be able to define their own agents with:

* Input/output schema templates
* Prompt libraries
* Optional fine-tuned model integration

Early versions are compiled to WASM and run inside secure sandboxes.
