> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sketricgen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Core Concepts

> Learn the core building blocks of SketricGen: AgentSpace, AI agents, tools, handoffs, structured I/O, and traces for multi-agent orchestration.

Every workflow in SketricGen starts inside an AgentSpace — a visual environment where you connect agents, tools, and logic to build intelligent, multi-agent systems.

The following concepts form the foundation of how SketricGen works.

## AgentSpace

Your AgentSpace is the visual workspace where you design and test multi-agent workflows.

Each workflow is composed of nodes and edges that define the logic of collaboration.

* **Nodes = Agents or tools.** Each node represents a role or capability.
* **Edges = Handoffs, connections.** Define how one agent passes control or data to another and connects to tools.
* You can version, duplicate, and promote flows as they evolve.

**Guideline:**

Start small. Build two or three connected agents, validate each handoff, and observe the trace before scaling to complex workflows.

<img src="https://mintcdn.com/sketricgen/c4HlQLmBiw0POS1H/images/core-concepts/core_agent_space.png?fit=max&auto=format&n=c4HlQLmBiw0POS1H&q=85&s=4a419423c2caf3df0aad0d46df7b1e73" alt="AgentSpace Canvas showing connected nodes representing agents and tools with edges showing handoffs between them" width="699" height="509" data-path="images/core-concepts/core_agent_space.png" />

## Agents

Agents are the individual roles in your workflow. Each has its own:

* **Instructions** (the prompt or system message defining purpose & tone)
* **Model & parameters** (OpenAI supported models)
* **Access to tools** (data retrieval or action execution)
* **Constraints** (enforced via agent instructions and structured schema validation)

Agents can:

* **Call tools** to fetch data or perform actions
* **Handoff** to other agents to delegate tasks
* **Produce structured outputs** such as JSON

**Guideline:**

Define each agent like a job description - what they *know*, *do*, and *when to delegate*.

Over-specifying beats ambiguity.

<img src="https://mintcdn.com/sketricgen/ctpt8wcI3kfPhZOQ/images/core-concepts/core_agent.png?fit=max&auto=format&n=ctpt8wcI3kfPhZOQ&q=85&s=61c65f30512e39ba2214ca18673ae991" alt="Agent configuration interface showing instructions, model settings, tools access, and guardrails" width="1984" height="1568" data-path="images/core-concepts/core_agent.png" />

## Tools (Capabilities)

Tools give agents the power to act, compute, or retrieve knowledge.

You can attach one or many tools to an agent.

| Tool                        | Purpose                                                                  | Typical Use Case                                           |
| --------------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------- |
| **Sketric App Marketplace** | Connect to 2000+ apps via prebuilt connectors and actions.               | CRM updates, sending emails, project management tasks.     |
| **File Search**             | Create a private knowledge base from uploaded files or crawled websites. | Product manuals, FAQs, policy docs.                        |
| **Web Search**              | Retrieve fresh, web-based context.                                       | Market research, news summaries, dynamic data.             |
| **Code Interpreter**        | Execute Python code securely in a sandbox.                               | Data transformation, quick computation, CSV analysis.      |
| **Image Generation**        | Generate images using AI models from text descriptions.                  | Marketing visuals, product mockups, social media graphics. |
| **API Request**             | Call external REST APIs with headers, auth, and schema mapping.          | Integrate internal systems or external SaaS APIs.          |
| **Custom MCP**              | Add standardized MCP servers for cross-app interoperability.             | Advanced enterprise integrations.                          |

**Guideline:**

Attach only the tools that each agent truly needs — fewer tools make reasoning more focused and traces easier to interpret.

<img src="https://mintcdn.com/sketricgen/ctpt8wcI3kfPhZOQ/images/core-concepts/core_tools.png?fit=max&auto=format&n=ctpt8wcI3kfPhZOQ&q=85&s=7c21891c07ee63674efec7332d3e4ec6" alt="Tools marketplace interface showing available tools including Sketric App Marketplace, File Search, Web Search, Code Interpreter, API Request, and Custom MCP" width="1768" height="1156" data-path="images/core-concepts/core_tools.png" />

## Handoffs (Orchestration)

A handoff defines when and how one agent transfers the task to another.

They are the connective logic of your workflow.

* **AI-routed:** Agents decide when to hand off based on their instructions and handoff conditions you define on each edge.
* **Forced handoff:** Deterministic, designer-controlled routing that guarantees the next agent always runs after the current one completes.

<img src="https://mintcdn.com/sketricgen/ctpt8wcI3kfPhZOQ/images/core-concepts/core_handoff.png?fit=max&auto=format&n=ctpt8wcI3kfPhZOQ&q=85&s=05f4f50e6a6cf676db64ec3b8fc7970a" alt="Handoff configuration interface showing AI-routed and forced handoff options" width="1984" height="808" data-path="images/core-concepts/core_handoff.png" />

## Structured Inputs & Outputs (JSON)

Use **structured JSON schemas** to keep workflows reliable, traceable, and composable.

* **Structured input:** The *calling* agent must follow the defined schema only when it calls this agent (e.g. as a tool or handoff). It is not required when calling other agents or when returning a response directly to the user.
* **Structured output:** The agent always returns the defined schema, whether a handoff agent or a human receives the response.
* Define required and optional fields in the agent node inspector under **Advanced Mode** → **Structured Data**.
* Keep schemas consistent across agents for smoother data flow.

**Guideline:**

Always validate schema changes in the Trace Explorer before publishing—small mismatches can break downstream logic.

<img src="https://mintcdn.com/sketricgen/ctpt8wcI3kfPhZOQ/images/core-concepts/core_structured_data_ui.png?fit=max&auto=format&n=ctpt8wcI3kfPhZOQ&q=85&s=c11ffa43907a09e128047ff9675805f0" alt="Edit Agent Advanced Mode with Structured Data — Input Schema and Output Schema" width="1282" height="1558" data-path="images/core-concepts/core_structured_data_ui.png" />

<img src="https://mintcdn.com/sketricgen/ctpt8wcI3kfPhZOQ/images/core-concepts/core_structure_data_setup.png?fit=max&auto=format&n=ctpt8wcI3kfPhZOQ&q=85&s=ec796e5207d358024977f8c0d79a9737" alt="Configure Structured Output (JSON) modal with schema name and fields" width="2244" height="1558" data-path="images/core-concepts/core_structure_data_setup.png" />

## Conversations, Tool Calls & Traces

Every interaction generates data you can inspect and learn from.

* A **Conversation** is a complete user interaction flow.
* **Tool Calls** show when and how a tool was used.
* **Traces** record the sequence of agents, tool inputs/outputs, reasoning artifacts, duration, and credit consumption.

The **Trace Explorer** helps you visualize each step and pinpoint inefficiencies.

**Guideline:**

Review traces often - optimize agents that over-call tools or generate unnecessary handoffs.

<img src="https://mintcdn.com/sketricgen/c4HlQLmBiw0POS1H/images/core-concepts/core_trace.png?fit=max&auto=format&n=c4HlQLmBiw0POS1H&q=85&s=6f413845be3eb1cf539f82900f1ded51" alt="Trace Explorer interface showing conversation flow, agent interactions, tool calls, durations, and credit consumption" width="891" height="495" data-path="images/core-concepts/core_trace.png" />

## Deployment (At a Glance)

Once your workflow is ready, deploy it through any of these paths:

* **Widget:** Configure your branding (logo, colors, greeting message) and embed the snippet into your site or CMS.
* **Messaging platforms:** Connect to WhatsApp, Telegram, Instagram, or Slack for direct user interaction.
* **Public API & SDKs:** Trigger workflows programmatically (Node or Python SDK) and receive **structured JSON** responses.

(See the [Deploy](/deploy/whatsapp) section for integration-specific steps.)

## Philosophy: Agentic, Not Hard-Coded

SketricGen empowers you to design agentic systems, not brittle automations.

You define roles, tools, and logic - SketricGen handles the orchestration, scaling, and traceability.

Every workflow you ship becomes a living, improvable system.
