Build your first RAG system with KnowledgeBase in 5 minutes
Overview
This guide walks you through building a complete Retrieval-Augmented Generation (RAG) system step by step. By the end, your agent will answer questions using your own documents.
from upsonic import Agent, Task, KnowledgeBasefrom upsonic.embeddings import OpenAIEmbedding, OpenAIEmbeddingConfigfrom upsonic.vectordb import ChromaProvider, ChromaConfig, ConnectionConfig, Modefrom upsonic.loaders.pdf import PdfLoaderfrom upsonic.loaders.config import PdfLoaderConfig# Step 1: Setup embedding providerembedding = OpenAIEmbedding(OpenAIEmbeddingConfig( model_name="text-embedding-3-small"))# Step 2: Setup vector databasevectordb = ChromaProvider(ChromaConfig( collection_name="my_rag_kb", vector_size=1536, connection=ConnectionConfig( mode=Mode.EMBEDDED, db_path="./rag_database" )))# Step 3: Setup PDF loaderloader = PdfLoader(PdfLoaderConfig())# Step 4: Create knowledge base with documentskb = KnowledgeBase( sources=["document.pdf"], embedding_provider=embedding, vectordb=vectordb, loaders=[loader])# Step 5: Create agent and taskagent = Agent("anthropic/claude-sonnet-4-5")task = Task( description="What is the daily working hours policy described in the text?", context=[kb])# Step 6: Execute and get resultsresult = agent.do(task)print(result)
Step-by-Step Breakdown
1. Embedding Provider
The embedding provider converts text into vector representations for semantic search. The vector_size in your vector database config must match the embedding model’s output dimension (1536 for text-embedding-3-small).
from upsonic.embeddings import OpenAIEmbedding, OpenAIEmbeddingConfigembedding = OpenAIEmbedding(OpenAIEmbeddingConfig( model_name="text-embedding-3-small"))
2. Vector Database
The vector database stores embedded document chunks for fast similarity search. Choose any supported provider — this example uses Chroma in embedded mode.
from upsonic.vectordb import ChromaProvider, ChromaConfig, ConnectionConfig, Modevectordb = ChromaProvider(ChromaConfig( collection_name="my_rag_kb", vector_size=1536, # Must match embedding model dimension connection=ConnectionConfig( mode=Mode.EMBEDDED, db_path="./rag_database" )))
3. Knowledge Base
KnowledgeBase orchestrates the entire pipeline: it loads documents, chunks text, generates embeddings, and stores them.
If you don’t specify loaders, KnowledgeBase auto-detects the appropriate loader based on file extension. Explicit loaders give you more control over parsing behavior.
4. Agent + Task
Pass the knowledge base as context to the Task. The agent automatically queries it for relevant chunks before generating a response.
from upsonic import Agent, Taskagent = Agent("anthropic/claude-sonnet-4-5")task = Task( description="What is the main topic?", context=[kb])result = agent.do(task)
What Happens Behind the Scenes
Document Loading — KnowledgeBase detects the file type and loads the document
Text Chunking — The document is split into smaller chunks optimized for retrieval
Embedding Generation — Each chunk is converted to a vector embedding
Vector Storage — Embeddings are stored in the vector database
Query Processing — When the task runs, the description is embedded and matched against stored chunks
Context Injection — The most relevant chunks are injected into the agent’s context
Response Generation — The agent uses the retrieved context to generate an answer
Next Steps
Examples — More patterns: async, streaming, multiple KBs, custom splitters
Using as Tool — Let agents actively search the KB (instead of auto-injection)
Vector Stores — Compare and choose the right vector database
Query Control — Fine-tune when RAG context is injected
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Upsonic AI","colors":{"primary":"#03D47E","light":"#00D37F","dark":"#00D37F"},"logo":{"light":"https://mintcdn.com/upsonic/eD3pOHUjFRrpRlr1/logo/logo_name.png?fit=max\u0026auto=format\u0026n=eD3pOHUjFRrpRlr1\u0026q=85\u0026s=a5f719ba8cc7e2e5247f98ce0f4cd570","dark":"https://mintcdn.com/upsonic/NvtIPMvILtME55zd/logo/logo_name_dark.png?fit=max\u0026auto=format\u0026n=NvtIPMvILtME55zd\u0026q=85\u0026s=b6ee805d29e1196fd56206200f0fe42b"},"favicon":"https://mintcdn.com/upsonic/Q5tER9e3gIUsdKBE/favicon.png?fit=max\u0026auto=format\u0026n=Q5tER9e3gIUsdKBE\u0026q=85\u0026s=6d90389a3780b1c15cff5e3f56f8bd5b","appearance":{"default":"dark","strict":false},"navbar":{"primary":{"type":"github","href":"https://github.com/Upsonic/Upsonic"}},"footer":{"socials":{"discord":"https://discord.gg/7648R8JahY","x":"https://x.com/UpsonicAI","github":"https://github.com/Upsonic","linkedin":"https://www.linkedin.com/company/getupsonic"}},"fonts":{"heading":{"family":"Helvetica","weight":750},"body":{"family":"Inter","weight":400}},"integrations":{"gtm":{"tagId":"GTM-MQ8VVXSB"}},"interaction":{"drilldown":true},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"upsonic","hasAudioNarration":false,"actualSubdomain":"upsonic","customDomains":["docs.upsonic.ai"],"gitSource":{"type":"github","owner":"upsonic","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae0964beb5b4f30de3efad5","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Upsonic Framework","count":373},{"language":"default","tag":"CONCEPTS","count":353},{"language":"default","tag":"Usage","count":109},{"language":"default","tag":"Advanced","count":79},{"language":"default","tag":"AgentOS","count":53},{"language":"default","tag":"Tools","count":52},{"language":"default","tag":"Knowledge Base","count":51},{"language":"default","tag":"Integrations","count":45},{"language":"default","tag":"LLM Support","count":32},{"language":"default","tag":"Examples","count":31}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"concepts/knowledgebase/basic-rag-example","slug":"/concepts/knowledgebase/basic-rag-example","pageMetadata":{"title":"Getting Started","sidebarTitle":"Getting Started","description":"Build your first RAG system with KnowledgeBase in 5 minutes","href":"/concepts/knowledgebase/basic-rag-example"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Build your first RAG system with KnowledgeBase in 5 minutes\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`This guide walks you through building a complete Retrieval-Augmented Generation (RAG) system step by step. By the end, your agent will answer questions using your own documents.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Install the required dependencies:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"upsonic[chroma,pdf-loader,embeddings]\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`complete-example`,children:`Complete Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`42`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`42`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent, Task, KnowledgeBase`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.embeddings `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAIEmbedding, OpenAIEmbeddingConfig`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.vectordb `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChromaProvider, ChromaConfig, ConnectionConfig, Mode`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.loaders.pdf `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PdfLoader`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.loaders.config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PdfLoaderConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 1: Setup embedding provider`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`embedding `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAIEmbedding(OpenAIEmbeddingConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text-embedding-3-small\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 2: Setup vector database`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`vectordb `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChromaProvider(ChromaConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` collection_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my_rag_kb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` vector_size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1536`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ConnectionConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Mode.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`EMBEDDED`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` db_path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./rag_database\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 3: Setup PDF loader`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`loader `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PdfLoader(PdfLoaderConfig())`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 4: Create knowledge base with documents`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`kb `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KnowledgeBase(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` sources`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"document.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` embedding_provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`embedding,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` vectordb`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`vectordb,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` loaders`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[loader]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 5: Create agent and task`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`agent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic/claude-sonnet-4-5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`task `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Task(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is the daily working hours policy described in the text?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[kb]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 6: Execute and get results`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agent.do(task)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`step-by-step-breakdown`,children:`Step-by-Step Breakdown`}),`\n`,_jsx(Heading,{level:`3`,id:`1-embedding-provider`,children:`1. Embedding Provider`}),`\n`,_jsxs(_components.p,{children:[`The embedding provider converts text into vector representations for semantic search. The `,_jsx(_components.code,{children:`vector_size`}),` in your vector database config must match the embedding model’s output dimension (1536 for `,_jsx(_components.code,{children:`text-embedding-3-small`}),`).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.embeddings `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAIEmbedding, OpenAIEmbeddingConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`embedding `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAIEmbedding(OpenAIEmbeddingConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text-embedding-3-small\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`2-vector-database`,children:`2. Vector Database`}),`\n`,_jsxs(_components.p,{children:[`The vector database stores embedded document chunks for fast similarity search. Choose any `,_jsx(_components.a,{href:`/concepts/knowledgebase/vector-stores`,children:`supported provider`}),` — this example uses Chroma in embedded mode.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.vectordb `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChromaProvider, ChromaConfig, ConnectionConfig, Mode`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`vectordb `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChromaProvider(ChromaConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` collection_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my_rag_kb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` vector_size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1536`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Must match embedding model dimension`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ConnectionConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Mode.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`EMBEDDED`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` db_path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./rag_database\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`3-knowledge-base`,children:`3. Knowledge Base`}),`\n`,_jsx(_components.p,{children:`KnowledgeBase orchestrates the entire pipeline: it loads documents, chunks text, generates embeddings, and stores them.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KnowledgeBase`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.loaders.pdf `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PdfLoader`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic.loaders.config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PdfLoaderConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`loader `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PdfLoader(PdfLoaderConfig())`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`kb `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` KnowledgeBase(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` sources`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"document.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` embedding_provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`embedding,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` vectordb`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`vectordb,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` loaders`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[loader]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you don’t specify `,_jsx(_components.code,{children:`loaders`}),`, KnowledgeBase auto-detects the appropriate loader based on file extension. Explicit loaders give you more control over parsing behavior.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`4-agent-+-task`,children:`4. Agent + Task`}),`\n`,_jsxs(_components.p,{children:[`Pass the knowledge base as `,_jsx(_components.code,{children:`context`}),` to the Task. The agent automatically queries it for relevant chunks before generating a response.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` upsonic `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent, Task`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`agent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic/claude-sonnet-4-5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`task `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Task(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is the main topic?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[kb]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agent.do(task)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`what-happens-behind-the-scenes`,children:`What Happens Behind the Scenes`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Document Loading`}),` — KnowledgeBase detects the file type and loads the document`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Text Chunking`}),` — The document is split into smaller chunks optimized for retrieval`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Embedding Generation`}),` — Each chunk is converted to a vector embedding`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Vector Storage`}),` — Embeddings are stored in the vector database`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Query Processing`}),` — When the task runs, the description is embedded and matched against stored chunks`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Context Injection`}),` — The most relevant chunks are injected into the agent’s context`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Response Generation`}),` — The agent uses the retrieved context to generate an answer`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/concepts/knowledgebase/examples`,children:`Examples`}),` — More patterns: async, streaming, multiple KBs, custom splitters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/concepts/knowledgebase/using-as-tool`,children:`Using as Tool`}),` — Let agents actively search the KB (instead of auto-injection)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/concepts/knowledgebase/vector-stores`,children:`Vector Stores`}),` — Compare and choose the right vector database`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/concepts/knowledgebase/query-control`,children:`Query Control`}),` — Fine-tune when RAG context is injected`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Getting Started","sidebarTitle":"Getting Started","description":"Build your first RAG system with KnowledgeBase in 5 minutes","href":"/concepts/knowledgebase/basic-rag-example"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Complete Example","slug":"complete-example","depth":2,"children":[]},{"title":"Step-by-Step Breakdown","slug":"step-by-step-breakdown","depth":2,"children":[{"title":"1. Embedding Provider","slug":"1-embedding-provider","depth":3,"children":[]},{"title":"2. Vector Database","slug":"2-vector-database","depth":3,"children":[]},{"title":"3. Knowledge Base","slug":"3-knowledge-base","depth":3,"children":[]},{"title":"4. Agent + Task","slug":"4-agent-+-task","depth":3,"children":[]}]},{"title":"What Happens Behind the Scenes","slug":"what-happens-behind-the-scenes","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/upsonic/418601343a17abbb/ga.js"],"subdomain":"upsonic","siteName":"Upsonic AI","title":"Getting Started - Upsonic AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-14T09:59:57.694Z","originalFileLocation":"concepts/knowledgebase/basic-rag-example.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Build your first RAG system with KnowledgeBase in 5 minutes\">\u003cmeta data-mint-head name=\"application-name\" content=\"Upsonic AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Getting Started - Upsonic AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build your first RAG system with KnowledgeBase in 5 minutes\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Upsonic AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://upsonic.mintlify.site/_mintlify/api/og/v2?division=Knowledge+Base\u0026amp;title=Getting+Started\u0026amp;description=Build+your+first+RAG+system+with+KnowledgeBase+in+5+minutes\u0026amp;theme=4220d6dda423f32b3126fd51\u0026amp;signature=054e2d208d146994048ded6a3523b836f8559d7f10e92f62d2974d66a1e0398a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Getting Started - Upsonic AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build your first RAG system with KnowledgeBase in 5 minutes\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://upsonic.mintlify.site/_mintlify/api/og/v2?division=Knowledge+Base\u0026amp;title=Getting+Started\u0026amp;description=Build+your+first+RAG+system+with+KnowledgeBase+in+5+minutes\u0026amp;theme=4220d6dda423f32b3126fd51\u0026amp;signature=054e2d208d146994048ded6a3523b836f8559d7f10e92f62d2974d66a1e0398a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/upsonic/adDEYx-Qrl3jC12g/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Upsonic AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#03D47E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/concepts/knowledgebase/basic-rag-example.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.upsonic.ai/#organization\",\"name\":\"Upsonic AI\",\"url\":\"https://docs.upsonic.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/upsonic/eD3pOHUjFRrpRlr1/logo/logo_name.png?fit=max\u0026auto=format\u0026n=eD3pOHUjFRrpRlr1\u0026q=85\u0026s=a5f719ba8cc7e2e5247f98ce0f4cd570\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.upsonic.ai#website\",\"name\":\"Upsonic AI\",\"url\":\"https://docs.upsonic.ai\",\"publisher\":{\"@id\":\"https://docs.upsonic.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example#webpage\",\"url\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example\",\"name\":\"Getting Started\",\"description\":\"Build your first RAG system with KnowledgeBase in 5 minutes\",\"dateModified\":\"2026-04-14T09:59:57.694Z\",\"isPartOf\":{\"@id\":\"https://docs.upsonic.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"CONCEPTS\",\"item\":\"https://docs.upsonic.ai/concepts/agents/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https://docs.upsonic.ai/concepts/knowledgebase/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Getting Started\",\"item\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example#article\",\"headline\":\"Getting Started\",\"name\":\"Getting Started\",\"description\":\"Build your first RAG system with KnowledgeBase in 5 minutes\",\"url\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example\",\"mainEntityOfPage\":{\"@id\":\"https://docs.upsonic.ai/concepts/knowledgebase/basic-rag-example#webpage\"},\"dateModified\":\"2026-04-14T09:59:57.694Z\",\"publisher\":{\"@id\":\"https://docs.upsonic.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.upsonic.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Upsonic AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Upsonic AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/concepts/knowledgebase/basic-rag-example.md","siteName":"Upsonic AI","nav":{"global":null,"tabs":[{"tab":"Upsonic Framework","groups":[{"group":"GET STARTED","icon":"https://mintlify-assets.b-cdn.net/compass-2.svg","pages":[{"title":"What is Upsonic","sidebarTitle":"Introduction","href":"/get-started/introduction"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/get-started/quickstart"},{"sidebarTitle":"Installation","title":"Installation","href":"/get-started/installation"},{"title":"Guides","sidebarTitle":"Guides","href":"/get-started/guides"},{"title":"Examples","sidebarTitle":"Examples","href":"/get-started/examples"},{"title":"IDE Integration","sidebarTitle":"IDE Integration","href":"/get-started/ide-integration"}]},{"group":"CONCEPTS","icon":"https://mintlify-assets.b-cdn.net/star-2.svg","pages":[{"group":"Agent","icon":"user-robot","pages":[{"title":"Agents","sidebarTitle":"Overview","href":"/concepts/agents/overview"},{"title":"Attributes","href":"/concepts/agents/attributes"},{"title":"Basic Agent Example","sidebarTitle":"Basic Agent Example","href":"/concepts/agents/creating-an-agent"},{"title":"Clanker","sidebarTitle":"Clanker","href":"/concepts/agents/clanker"},{"group":"Usage","pages":[{"title":"Adding Tools","sidebarTitle":"Adding Tools","href":"/concepts/agents/adding-tools"},{"title":"Image Generation","sidebarTitle":"Image Generation","href":"/concepts/agents/image-generation-agent"},{"title":"Running Agents","href":"/concepts/agents/running-agents"},{"title":"Accessing Agent Output","href":"/concepts/agents/access_output"},{"title":"Agent printing","href":"/concepts/agents/printing"},{"title":"Debugging Agents","href":"/concepts/agents/debugging-agents"},{"title":"Agent Metrics","sidebarTitle":"Metrics","href":"/concepts/agents/metrics"}]},{"group":"Advanced","pages":[{"title":"Adding a Memory","sidebarTitle":"Memory","href":"/concepts/agents/advanced/adding-a-memory"},{"title":"Adding Reasoning","sidebarTitle":"Reasoning","href":"/concepts/agents/advanced/adding-reasoning"},{"title":"Adding Thinking","sidebarTitle":"Thinking","href":"/concepts/agents/advanced/adding-thinking"},{"title":"Automatic Model Selection","sidebarTitle":"Model Selection","href":"/concepts/agents/advanced/automatic-model-selection"},{"title":"Reliability \u0026 Retries","sidebarTitle":"Reliability \u0026 Retries","href":"/concepts/agents/advanced/reliability-and-retries"},{"title":"Reflection","sidebarTitle":"Reflection","href":"/concepts/agents/advanced/reflection"},{"title":"Context Compression","sidebarTitle":"Context Compression","href":"/concepts/agents/advanced/context-compression"},{"title":"Company Knowledge","sidebarTitle":"Company Knowledge","href":"/concepts/agents/advanced/company-knowledge"},{"title":"Workspace Configuration","sidebarTitle":"Workspace (AGENTS.md)","href":"/concepts/agents/advanced/workspace"},{"title":"Expose Agent as MCP Server","sidebarTitle":"Agent as MCP","href":"/concepts/agents/advanced/agent-as-mcp"}]}]},{"group":"Autonomous Agent","icon":"robot","pages":[{"title":"Autonomous Agent","sidebarTitle":"Overview","href":"/concepts/autonomous-agent/overview"},{"title":"Attributes","href":"/concepts/autonomous-agent/attributes"},{"title":"Basic Autonomous Agent Example","sidebarTitle":"Basic Example","href":"/concepts/autonomous-agent/examples/basic-autonomous-agent-example"},{"group":"Usage","pages":[{"title":"Creating an Autonomous Agent","sidebarTitle":"Creating an Agent","href":"/concepts/autonomous-agent/creating-an-autonomous-agent"},{"title":"Running an Autonomous Agent","href":"/concepts/autonomous-agent/running-an-autonomous-agent"},{"title":"AGENTS.md","sidebarTitle":"AGENTS.md","href":"/concepts/autonomous-agent/agents-md"}]},{"group":"Advanced","pages":[{"title":"Filesystem Tools","href":"/concepts/autonomous-agent/advanced/filesystem-tools"},{"title":"Memory Integration","href":"/concepts/autonomous-agent/advanced/memory-integration"},{"title":"Shell Tools","href":"/concepts/autonomous-agent/advanced/shell-tools"},{"title":"Workspace Security","href":"/concepts/autonomous-agent/advanced/workspace-security"}]}]},{"group":"Prebuilt Autonomous Agents","icon":"sparkles","tag":"NEW","pages":[{"title":"Prebuilt Autonomous Agents","sidebarTitle":"Overview","href":"/concepts/prebuilt-autonomous-agents/overview"},{"title":"Applied Scientist","sidebarTitle":"Applied Scientist","href":"/concepts/prebuilt-autonomous-agents/applied-scientist"}]},{"group":"Safety Engine (Guardrails)","icon":"shield-check","pages":[{"title":"Safety Engine","sidebarTitle":"Overview","tag":"NEW","href":"/concepts/safety-engine/overview"},{"title":"Policy Points","sidebarTitle":"Policy Points","href":"/concepts/safety-engine/policy-points"},{"group":"Usage","pages":[{"group":"Prebuilt Policies","pages":[{"group":"Privacy \u0026 Compliance","pages":[{"title":"PII Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/pii-policies"},{"title":"Phone Number Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/phone-number-policies"}]},{"group":"Financial \u0026 Legal","pages":[{"title":"Financial Information Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/financial-information-policies"},{"title":"Cryptocurrency Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/cryptocurrency-policies"},{"title":"Legal Information Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/legal-information-policies"},{"title":"Medical Information Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/medical-information-policies"}]},{"group":"Security \u0026 Threats","pages":[{"title":"Cybersecurity Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/cybersecurity-policies"},{"title":"Technical Security Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/technical-security-policies"},{"title":"Fraud Detection Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/fraud-detection-policies"},{"title":"Phishing Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/phishing-policies"},{"title":"Insider Threat Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/insider-threat-policies"}]},{"group":"Content Moderation","pages":[{"title":"Adult Content Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/adult-content-policies"},{"title":"Profanity Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/profanity-policies"},{"title":"Sensitive Social Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/sensitive-social-policies"}]},{"group":"Tool Safety","pages":[{"title":"Tool Safety Policies","href":"/concepts/safety-engine/usage/prebuilt-policies/tool-safety-policies"}]}]},{"group":"Custom Policy","pages":[{"title":"Creating Rule","href":"/concepts/safety-engine/custom-policy/creating-rule"},{"title":"Creating Action","href":"/concepts/safety-engine/custom-policy/creating-action"},{"title":"Creating Policy","href":"/concepts/safety-engine/custom-policy/creating-policy"}]}]},{"group":"Advanced","pages":[{"title":"Policy Feedback Loop","href":"/concepts/safety-engine/policy-feedback-loop"}]}]},{"group":"Task","icon":"list-check","pages":[{"title":"Tasks","sidebarTitle":"Overview","href":"/concepts/tasks/overview"},{"title":"Attributes","href":"/concepts/tasks/attributes"},{"title":"Basic Task Example","sidebarTitle":"Basic Task Example","href":"/concepts/tasks/creating-task"},{"group":"Usage","pages":[{"title":"Adding Tools","sidebarTitle":"Adding Tools","href":"/concepts/tasks/adding-tools"},{"title":"Response Format","sidebarTitle":"Response Format","href":"/concepts/tasks/response-format"},{"title":"Task Result","sidebarTitle":"Task Result","href":"/concepts/tasks/results"},{"title":"Task Metrics","sidebarTitle":"Metrics","href":"/concepts/tasks/metrics"},{"title":"Task Response Caching","sidebarTitle":"Caching","href":"/concepts/tasks/task-caching"},{"group":"Context","pages":[{"title":"Adding Documents to Task Context","sidebarTitle":"Document Context","href":"/concepts/tasks/context-management/adding-document-context-to-task"},{"title":"Adding Tasks to Other Tasks as Context","sidebarTitle":"Task Context","href":"/concepts/tasks/context-management/adding-tasks-to-other-tasks-as-context"},{"title":"Adding Knowledge Base to Task Context","sidebarTitle":"Knowledge Base Context","href":"/concepts/tasks/context-management/adding-knowledge-base-to-task-context"},{"title":"Adding Images to Task Context","sidebarTitle":"Image Context","href":"/concepts/tasks/context-management/adding-images-to-task-context"}]}]}]},{"group":"Tools","icon":"wrench","pages":[{"title":"Tools","sidebarTitle":"Overview","href":"/concepts/tools/overview"},{"title":"Tool Locations","sidebarTitle":"Tool Locations (Agent/Task)","href":"/concepts/tools/tool-locations"},{"group":"Function \u0026 Class Tools","pages":[{"title":"Overview","href":"/concepts/tools/function-class-tools/overview"},{"title":"Creating Function Tool","href":"/concepts/tools/function-class-tools/creating-function-tool"},{"title":"Creating Class Tool","href":"/concepts/tools/function-class-tools/creating-class-tool"},{"title":"Creating ToolKit","href":"/concepts/tools/function-class-tools/creating-toolkit"},{"title":"Attributes","href":"/concepts/tools/function-class-tools/attributes"},{"group":"Advanced","pages":[{"group":"Behavior \u0026 Control","pages":[{"title":"Required Confirmation","href":"/concepts/tools/function-class-tools/advanced/behavior-control/required-confirmation"},{"title":"Requires User Input","href":"/concepts/tools/function-class-tools/advanced/behavior-control/requires-user-input"},{"title":"User Input Fields","href":"/concepts/tools/function-class-tools/advanced/behavior-control/user-input-fields"},{"title":"External Execution","href":"/concepts/tools/function-class-tools/advanced/behavior-control/external-execution"},{"title":"Show Result","href":"/concepts/tools/function-class-tools/advanced/behavior-control/show-result"},{"title":"Stop After Tool Call","href":"/concepts/tools/function-class-tools/advanced/behavior-control/stop-after-tool-call"},{"title":"Instructions","href":"/concepts/tools/function-class-tools/advanced/behavior-control/instructions"}]},{"group":"Performance","pages":[{"title":"Sequential \u0026 Parallel Run","href":"/concepts/tools/function-class-tools/advanced/performance/sequential-parallel-run"},{"title":"Caching","href":"/concepts/tools/function-class-tools/advanced/performance/caching"},{"title":"Timeout","href":"/concepts/tools/function-class-tools/advanced/performance/timeout"},{"title":"Tool Hooks","href":"/concepts/tools/function-class-tools/advanced/performance/tool-hooks"}]},{"group":"Schema \u0026 Validation","pages":[{"title":"Strict","href":"/concepts/tools/function-class-tools/advanced/schema-validation/strict"},{"title":"Docstring Format","href":"/concepts/tools/function-class-tools/advanced/schema-validation/docstring-format"}]}]}]},{"group":"MCP Tools","pages":[{"title":"Overview","href":"/concepts/tools/mcp-tools/overview"},{"title":"MCPHandler","href":"/concepts/tools/mcp-tools/mcp-handler"},{"title":"MultiMCPHandler","href":"/concepts/tools/mcp-tools/multi-mcp-handler"},{"title":"Authentication","href":"/concepts/tools/mcp-tools/authentication"},{"group":"Examples","pages":[{"title":"GitHub MCP Agent","sidebarTitle":"GitHub","href":"/concepts/tools/mcp-tools/examples/github-agent"},{"title":"Notion MCP Agent","sidebarTitle":"Notion","href":"/concepts/tools/mcp-tools/examples/notion-agent"},{"title":"Stripe MCP Agent","sidebarTitle":"Stripe","href":"/concepts/tools/mcp-tools/examples/stripe-agent"},{"title":"Google Calendar MCP Agent","sidebarTitle":"Google Calendar","href":"/concepts/tools/mcp-tools/examples/google-calendar-agent"},{"title":"Gmail agent","href":"/concepts/tools/mcp-tools/examples/gmail-agent"},{"title":"Twitter (X) MCP Agent","sidebarTitle":"Twitter (X)","href":"/concepts/tools/mcp-tools/examples/twitter-agent"}]}]},{"group":"Ready-to-Use Tools","pages":[{"group":"Search Tools","pages":[{"title":"DuckDuckGo","href":"/concepts/tools/search-tools/duckduckgo"},{"title":"BoCha Search","href":"/concepts/tools/search-tools/bochasearch"},{"title":"Tavily","href":"/concepts/tools/search-tools/tavily"}]},{"group":"Data Tools","pages":[{"title":"YFinanceTools","href":"/concepts/tools/data-tools/yfinance"}]},{"group":"Scraping Tools","pages":[{"title":"ApifyTools","href":"/concepts/tools/scraping-tools/apify"},{"title":"ExaTools","href":"/concepts/tools/scraping-tools/exa"},{"title":"FirecrawlTools","href":"/concepts/tools/scraping-tools/firecrawl"}]},{"group":"Sandbox Tools","pages":[{"title":"DaytonaTools","href":"/concepts/tools/sandbox-tools/daytona"},{"title":"E2BTools","href":"/concepts/tools/sandbox-tools/e2b"}]},{"group":"Model Provider Tools","pages":[{"title":"Supported Providers","href":"/concepts/tools/model-provider-tools/supported-providers"},{"title":"WebSearchTool","href":"/concepts/tools/model-provider-tools/web-search-tool"},{"title":"WebSearchUserLocation","href":"/concepts/tools/model-provider-tools/web-search-user-location"},{"title":"WebFetchTool","href":"/concepts/tools/model-provider-tools/web-fetch-tool"},{"title":"FileSearchTool","href":"/concepts/tools/model-provider-tools/file-search-tool"},{"title":"CodeExecutionTool","href":"/concepts/tools/model-provider-tools/code-execution-tool"},{"title":"UrlContextTool (Deprecated)","href":"/concepts/tools/model-provider-tools/url-context-tool"},{"title":"MCPServerTool","href":"/concepts/tools/model-provider-tools/mcp-server-tool"},{"title":"ImageGenerationTool","href":"/concepts/tools/model-provider-tools/image-generation-tool"}]}]},{"group":"Advanced","pages":[{"title":"Combining Multiple Tools","href":"/concepts/tools/advanced/combining-multiple-tools"},{"title":"Agent as Tool","href":"/concepts/tools/advanced/agent-as-tool"},{"title":"Adding Tools","href":"/concepts/tools/advanced/adding-tools"},{"title":"Removing Tools","href":"/concepts/tools/advanced/removing-tools"}]},{"title":"Best Practices","href":"/concepts/tools/best-practices"}]},{"group":"Usage Registry","icon":"gauge","tag":"NEW","pages":[{"title":"Usage Registry","sidebarTitle":"Usage Registry","href":"/concepts/usage-registry"}]},{"group":"Tracing","icon":"chart-line","pages":[{"title":"OpenTelemetry Tracing","href":"/concepts/tracing/overview"},{"group":"Integrations","pages":[{"group":"Langfuse","pages":[{"title":"Overview","href":"/concepts/tracing/integrations/langfuse/index"},{"group":"Advanced","pages":[{"title":"Scores","href":"/concepts/tracing/integrations/langfuse/advanced/scores"},{"title":"Score Configs","href":"/concepts/tracing/integrations/langfuse/advanced/score-configs"},{"title":"Datasets","href":"/concepts/tracing/integrations/langfuse/advanced/datasets"},{"title":"Annotation Queues","href":"/concepts/tracing/integrations/langfuse/advanced/annotation-queues"},{"title":"Update Trace","href":"/concepts/tracing/integrations/langfuse/advanced/update-trace"}]}]},{"group":"PromptLayer","pages":[{"title":"Overview","href":"/concepts/tracing/integrations/promptlayer/index"},{"title":"PromptLayer Advanced API","href":"/concepts/tracing/integrations/promptlayer/advanced"}]}]}]},{"group":"Skills","icon":"graduation-cap","tag":"NEW","pages":[{"title":"Skills","sidebarTitle":"Overview","href":"/concepts/skills/overview"},{"title":"SKILL.md Format","sidebarTitle":"SKILL.md Format","href":"/concepts/skills/skill-format"},{"title":"Metrics \u0026 Monitoring","sidebarTitle":"Metrics","href":"/concepts/skills/metrics"},{"group":"Loaders","pages":[{"title":"Skill Loaders","sidebarTitle":"Overview","href":"/concepts/skills/loaders/overview"},{"title":"LocalSkills","sidebarTitle":"LocalSkills","href":"/concepts/skills/loaders/local"},{"title":"URLSkills","sidebarTitle":"URLSkills","href":"/concepts/skills/loaders/url"},{"title":"GitHubSkills","sidebarTitle":"GitHubSkills","href":"/concepts/skills/loaders/github"},{"title":"InlineSkills","sidebarTitle":"InlineSkills","href":"/concepts/skills/loaders/inline"},{"title":"BuiltinSkills","sidebarTitle":"BuiltinSkills","href":"/concepts/skills/loaders/builtin"}]},{"group":"Advanced","pages":[{"title":"Advanced Features","sidebarTitle":"Overview","href":"/concepts/skills/advanced/overview"},{"title":"Callbacks","sidebarTitle":"Callbacks","href":"/concepts/skills/advanced/callbacks"},{"title":"Auto-Selection","sidebarTitle":"Auto-Selection","href":"/concepts/skills/advanced/auto-selection"},{"title":"Safety Policies","sidebarTitle":"Safety Policies","href":"/concepts/skills/advanced/safety"},{"title":"Versioning","sidebarTitle":"Versioning","href":"/concepts/skills/advanced/versioning"},{"title":"Dependencies","sidebarTitle":"Dependencies","href":"/concepts/skills/advanced/dependencies"},{"title":"Caching","sidebarTitle":"Caching","href":"/concepts/skills/advanced/caching"}]}]},{"group":"Memory","icon":"brain","pages":[{"title":"Memory","sidebarTitle":"Overview","href":"/concepts/memory/overview"},{"title":"Attributes","href":"/concepts/memory/attributes"},{"title":"Basic Memory Example","href":"/concepts/memory/examples/basic-memory-example"},{"group":"Usage","pages":[{"title":"Choosing Right Memory Types","href":"/concepts/memory/choosing-right-memory-types"},{"group":"Memory Types","pages":[{"title":"Conversation Memory","href":"/concepts/memory/memory-types/conversation-memory"},{"title":"User Analysis Memory","href":"/concepts/memory/memory-types/focus-memory"},{"title":"Summary Memory","href":"/concepts/memory/memory-types/summary-memory"}]},{"group":"Storage Backends","pages":[{"title":"InMemoryStorage","href":"/concepts/memory/storage/inmemory"},{"title":"JSONStorage","href":"/concepts/memory/storage/json"},{"title":"SqliteStorage","href":"/concepts/memory/storage/sqlite"},{"title":"PostgresStorage","href":"/concepts/memory/storage/postgres"},{"title":"RedisStorage","href":"/concepts/memory/storage/redis"},{"title":"MongoStorage","href":"/concepts/memory/storage/mongo"},{"title":"Mem0Storage","href":"/concepts/memory/storage/mem0"},{"title":"AsyncSqliteStorage","sidebarTitle":"SQLite (Async)","href":"/concepts/memory/storage/async-sqlite"},{"title":"AsyncPostgresStorage","sidebarTitle":"PostgreSQL (Async)","href":"/concepts/memory/storage/async-postgres"},{"title":"AsyncMongoStorage","sidebarTitle":"MongoDB (Async)","href":"/concepts/memory/storage/async-mongo"},{"title":"AsyncMem0Storage","sidebarTitle":"Mem0 (Async)","href":"/concepts/memory/storage/async-mem0"},{"title":"Storage Tables","href":"/concepts/memory/storage/storage-tables"}]}]}]},{"group":"Knowledge Base","icon":"book-open","pages":[{"title":"KnowledgeBase","sidebarTitle":"Overview","href":"/concepts/knowledgebase/overview"},{"title":"Attributes","description":"Configuration options for the KnowledgeBase","href":"/concepts/knowledgebase/attributes"},{"title":"Getting Started","sidebarTitle":"Getting Started","href":"/concepts/knowledgebase/basic-rag-example"},{"group":"Usage","pages":[{"title":"Putting Files","description":"How to add documents to your KnowledgeBase","href":"/concepts/knowledgebase/putting-files"},{"title":"Query Control","href":"/concepts/knowledgebase/query-control"},{"title":"Using as Tool","href":"/concepts/knowledgebase/using-as-tool"},{"title":"Examples","href":"/concepts/knowledgebase/examples"}]},{"group":"Integrations","pages":[{"group":"Embedding Providers","pages":[{"title":"OpenAI Embeddings","href":"/concepts/knowledgebase/embedding-providers/openai"},{"title":"Azure OpenAI Embeddings","href":"/concepts/knowledgebase/embedding-providers/azure"},{"title":"Google Gemini Embeddings","href":"/concepts/knowledgebase/embedding-providers/google"},{"title":"AWS Bedrock Embeddings","href":"/concepts/knowledgebase/embedding-providers/bedrock"},{"title":"HuggingFace Embeddings","href":"/concepts/knowledgebase/embedding-providers/huggingface"},{"title":"FastEmbed Embeddings","href":"/concepts/knowledgebase/embedding-providers/fastembed"},{"title":"Ollama Embeddings","href":"/concepts/knowledgebase/embedding-providers/ollama"}]},{"group":"Document Loaders","pages":[{"title":"PyPDF Loader","href":"/concepts/knowledgebase/document-loaders/pypdf"},{"title":"PdfPlumber Loader","href":"/concepts/knowledgebase/document-loaders/pdfplumber"},{"title":"PyMuPDF Loader","href":"/concepts/knowledgebase/document-loaders/pymupdf"},{"title":"Docling Loader","href":"/concepts/knowledgebase/document-loaders/docling"},{"title":"DOCX Loader","href":"/concepts/knowledgebase/document-loaders/docx"},{"title":"CSV Loader","href":"/concepts/knowledgebase/document-loaders/csv"},{"title":"JSON Loader","href":"/concepts/knowledgebase/document-loaders/json"},{"title":"Markdown Loader","href":"/concepts/knowledgebase/document-loaders/markdown"},{"title":"HTML Loader","href":"/concepts/knowledgebase/document-loaders/html"},{"title":"XML Loader","href":"/concepts/knowledgebase/document-loaders/xml"},{"title":"YAML Loader","href":"/concepts/knowledgebase/document-loaders/yml"},{"title":"Text Loader","href":"/concepts/knowledgebase/document-loaders/text"}]},{"group":"Text Splitters","pages":[{"title":"Recursive Splitter","href":"/concepts/knowledgebase/text-splitters/recursive"},{"title":"Semantic Splitter","href":"/concepts/knowledgebase/text-splitters/semantic"},{"title":"Agentic Splitter","href":"/concepts/knowledgebase/text-splitters/agentic"},{"title":"Character Splitter","href":"/concepts/knowledgebase/text-splitters/character"},{"title":"Markdown Splitter","href":"/concepts/knowledgebase/text-splitters/markdown"},{"title":"HTML Splitter","href":"/concepts/knowledgebase/text-splitters/html"},{"title":"JSON Splitter","href":"/concepts/knowledgebase/text-splitters/json"},{"title":"Python Splitter","href":"/concepts/knowledgebase/text-splitters/python"}]},{"group":"Vector Stores","pages":[{"title":"Vector Stores","sidebarTitle":"Overview","href":"/concepts/knowledgebase/vector-stores/overview"},{"title":"Chroma","href":"/concepts/knowledgebase/vector-stores/chroma"},{"title":"Qdrant","href":"/concepts/knowledgebase/vector-stores/qdrant"},{"title":"Pinecone","href":"/concepts/knowledgebase/vector-stores/pinecone"},{"title":"Milvus","href":"/concepts/knowledgebase/vector-stores/milvus"},{"title":"PGVector","href":"/concepts/knowledgebase/vector-stores/pgvector"},{"title":"FAISS","href":"/concepts/knowledgebase/vector-stores/faiss"},{"title":"Weaviate","href":"/concepts/knowledgebase/vector-stores/weaviate"},{"title":"SuperMemory","href":"/concepts/knowledgebase/vector-stores/supermemory"}]}]},{"group":"Advanced","pages":[{"title":"Advanced Features","sidebarTitle":"Overview","href":"/concepts/knowledgebase/advanced/overview"},{"title":"Intelligent Auto-Detection","sidebarTitle":"Auto-Detection","href":"/concepts/knowledgebase/advanced/auto-detection"},{"title":"Indexed Processing","sidebarTitle":"Indexed Processing","href":"/concepts/knowledgebase/advanced/indexed-processing"},{"title":"Direct Content","sidebarTitle":"Direct Content","href":"/concepts/knowledgebase/advanced/direct-content"},{"title":"Vector Search Tuning","sidebarTitle":"Search Tuning","href":"/concepts/knowledgebase/advanced/vector-search-params"},{"title":"Document Management","sidebarTitle":"Document Management","href":"/concepts/knowledgebase/advanced/document-management"},{"title":"Storage Persistence","href":"/concepts/knowledgebase/advanced/storage-persistence"},{"title":"Isolated Search","href":"/concepts/knowledgebase/advanced/isolate-search"}]}]},{"group":"Team","icon":"people-group","pages":[{"title":"Team","sidebarTitle":"Overview","href":"/concepts/team/overview"},{"title":"Attributes","href":"/concepts/team/attributes"},{"title":"Basic Team Example","href":"/concepts/team/examples/basic-team-example"},{"group":"Usage","pages":[{"group":"Team Modes","pages":[{"title":"Choosing Right Team Mode","href":"/concepts/team/choosing-right-team-mode"},{"title":"Sequential","href":"/concepts/team/modes/sequential"},{"title":"Coordinate","href":"/concepts/team/modes/coordinate"},{"title":"Route","href":"/concepts/team/modes/route"}]},{"title":"Assigning Tasks Manually","href":"/concepts/team/assigning-tasks-manually"},{"title":"Team Metrics","sidebarTitle":"Metrics","href":"/concepts/team/metrics"}]},{"group":"Advanced","pages":[{"title":"Expose Team as MCP Server","sidebarTitle":"Team as MCP","href":"/concepts/team/advanced/team-as-mcp"},{"title":"Nested Teams","href":"/concepts/team/advanced/nested-teams"}]}]},{"group":"LLM Support","icon":"brain-circuit","pages":[{"title":"LLM","sidebarTitle":"Overview","href":"/concepts/llm-support/llm-overview"},{"title":"Model as String","href":"/concepts/llm-support/model-as-string"},{"title":"Compatibility Overview","href":"/concepts/llm-support/compatibility-overview"},{"group":"Native Providers","pages":[{"title":"OpenAI Chat","href":"/concepts/llm-support/providers/openai-chat"},{"title":"OpenAI Responses","href":"/concepts/llm-support/providers/openai-responses"},{"title":"Anthropic","href":"/concepts/llm-support/providers/anthropic"},{"title":"Google (Gemini)","href":"/concepts/llm-support/providers/google"},{"title":"Grok","href":"/concepts/llm-support/providers/grok"},{"title":"Mistral","href":"/concepts/llm-support/providers/mistral"},{"title":"Cohere","href":"/concepts/llm-support/providers/cohere"},{"title":"Moonshot AI","href":"/concepts/llm-support/providers/moonshotai"},{"title":"xAI","href":"/concepts/llm-support/providers/xai"}]},{"group":"Cloud Providers","pages":[{"title":"Azure OpenAI","href":"/concepts/llm-support/providers/azure"},{"title":"AWS Bedrock","href":"/concepts/llm-support/providers/bedrock"},{"title":"Huggingface","href":"/concepts/llm-support/providers/huggingface"},{"title":"Heroku","href":"/concepts/llm-support/providers/heroku"},{"title":"OVHcloud","href":"/concepts/llm-support/providers/ovhcloud"}]},{"group":"Local Providers","pages":[{"title":"Ollama","href":"/concepts/llm-support/providers/ollama"},{"title":"vLLM","href":"/concepts/llm-support/providers/vllm"},{"title":"LM Studio","href":"/concepts/llm-support/providers/lmstudio"}]},{"group":"Model Gateways","pages":[{"title":"Groq","href":"/concepts/llm-support/providers/groq"},{"title":"LiteLLM","href":"/concepts/llm-support/providers/litellm"},{"title":"NVIDIA NIM","href":"/concepts/llm-support/providers/nvidia"},{"title":"OpenRouter","href":"/concepts/llm-support/providers/openrouter"},{"title":"Cerebras","href":"/concepts/llm-support/providers/cerebras"},{"title":"GitHub Models","href":"/concepts/llm-support/providers/github"},{"title":"Outlines","href":"/concepts/llm-support/providers/outlines"},{"title":"SambaNova","href":"/concepts/llm-support/providers/sambanova"},{"title":"Together","href":"/concepts/llm-support/providers/together"},{"title":"Vercel","href":"/concepts/llm-support/providers/vercel"}]},{"title":"OpenAI-Like Models","href":"/concepts/llm-support/openai-compatible"},{"title":"Error Handling","href":"/concepts/llm-support/error-handling"}]},{"group":"OCR","icon":"scanner-image","pages":[{"title":"OCR","sidebarTitle":"Overview","href":"/concepts/ocr/overview"},{"title":"Architecture","href":"/concepts/ocr/architecture"},{"title":"Attributes","href":"/concepts/ocr/attributes"},{"title":"Basic OCR Example","href":"/concepts/ocr/examples/basic-ocr-example"},{"group":"Usage","pages":[{"title":"Create an OCR","href":"/concepts/ocr/create-an-ocr"},{"title":"Running an OCR","href":"/concepts/ocr/running-an-ocr"},{"group":"Engines","pages":[{"title":"EasyOCR","href":"/concepts/ocr/engines/easyocr"},{"title":"RapidOCR","href":"/concepts/ocr/engines/rapidocr"},{"title":"Tesseract","href":"/concepts/ocr/engines/tesseract"},{"title":"DeepSeek OCR (VLLM)","href":"/concepts/ocr/engines/deepseek-ocr"},{"title":"DeepSeek OCR (Ollama)","href":"/concepts/ocr/engines/deepseek-ocr-ollama"},{"title":"PaddleOCR","href":"/concepts/ocr/engines/paddleocr"}]},{"title":"Timeout","href":"/concepts/ocr/timeout"},{"title":"Metrics and Performance","href":"/concepts/ocr/metrics-and-performance"}]},{"group":"Advanced","pages":[{"title":"Advanced Features","href":"/concepts/ocr/advanced-features"},{"title":"Exception Handling","href":"/concepts/ocr/exception-handling"}]}]},{"group":"HITL (Human in the Loop)","icon":"user-check","pages":[{"title":"Human-in-the-Loop (HITL)","sidebarTitle":"Overview","href":"/concepts/hitl/overview"},{"group":"Usage","pages":[{"title":"Durable Execution","sidebarTitle":"Durable Execution","href":"/concepts/hitl/durable-execution"},{"title":"External Tool Execution","sidebarTitle":"External Tool Execution","href":"/concepts/hitl/external-tool-execution"},{"title":"Cancel Run","sidebarTitle":"Cancel Run","href":"/concepts/hitl/cancel-run"},{"title":"User Input","sidebarTitle":"User Input","href":"/concepts/hitl/user-input"},{"title":"Dynamic User Input","sidebarTitle":"Dynamic User Input","href":"/concepts/hitl/dynamic-user-input"},{"title":"User Confirmation","sidebarTitle":"User Confirmation","href":"/concepts/hitl/user-confirmation"}]}]},{"group":"Culture","icon":"users-gear","pages":[{"title":"Culture","sidebarTitle":"Overview","tag":"NEW","href":"/concepts/culture/overview"}]},{"group":"Deep Agent","icon":"brain-circuit","pages":[{"title":"Deep Agent","sidebarTitle":"Overview","href":"/concepts/deep-agent/overview"},{"title":"Attributes","href":"/concepts/deep-agent/attributes"},{"title":"Basic Deep Agent Example","href":"/concepts/deep-agent/examples/basic-deep-agent-example"},{"group":"Usage","pages":[{"title":"Planning","href":"/concepts/deep-agent/capabilities/planning"},{"title":"To-Do Management","href":"/concepts/deep-agent/capabilities/to-do-management"},{"title":"Virtual File System","href":"/concepts/deep-agent/capabilities/virtual-file-system"},{"title":"Subagent Generation","href":"/concepts/deep-agent/capabilities/subagent-generation"},{"title":"Storage Backends","href":"/concepts/deep-agent/capabilities/backends"}]},{"group":"Advanced","pages":[{"title":"Advanced","href":"/concepts/deep-agent/advanced"},{"title":"Software Developer Agent","href":"/concepts/deep-agent/examples/software-developer-agent"},{"title":"Research and Analysis Agent","href":"/concepts/deep-agent/examples/research-and-analysis-agent"},{"title":"Content Creation Agent","href":"/concepts/deep-agent/examples/content-creation-agent"}]}]},{"group":"Direct LLM Call","icon":"message-bot","pages":[{"title":"Direct","sidebarTitle":"Overview","href":"/concepts/direct-llm-call/overview"},{"title":"Attributes","href":"/concepts/direct-llm-call/attributes"},{"title":"Basic Direct LLM Call Example","href":"/concepts/direct-llm-call/examples/basic-direct-llm-call-example"},{"group":"Usage","pages":[{"title":"Image Processing","href":"/concepts/direct-llm-call/image-processing"}]}]},{"group":"Interfaces","icon":"plug","pages":[{"title":"Interfaces","sidebarTitle":"Overview","href":"/concepts/interfaces/Overview"},{"group":"Usage","pages":[{"title":"Slack","sidebarTitle":"Slack","href":"/concepts/interfaces/slack"},{"title":"WhatsApp","sidebarTitle":"WhatsApp","href":"/concepts/interfaces/whatsapp"},{"title":"Telegram","sidebarTitle":"Telegram","tag":"NEW","href":"/concepts/interfaces/telegram"},{"title":"Gmail","sidebarTitle":"Gmail","href":"/concepts/interfaces/gmail"},{"title":"Mail (SMTP/IMAP)","sidebarTitle":"Mail","href":"/concepts/interfaces/mail"}]},{"group":"Advanced","pages":[{"title":"Telegram Advanced","sidebarTitle":"Telegram Advanced","href":"/concepts/interfaces/telegram-advanced"}]}]},{"group":"Chat","icon":"messages","pages":[{"title":"Chat","sidebarTitle":"Overview","href":"/concepts/chat/overview"},{"title":"Attributes","href":"/concepts/chat/attributes"},{"title":"Basic Example","href":"/concepts/chat/examples/basic"},{"group":"Usage","pages":[{"title":"Creating a Chat","href":"/concepts/chat/creating-a-chat"},{"title":"Running a Chat","href":"/concepts/chat/running-a-chat"},{"title":"History Management","href":"/concepts/chat/history-management"},{"title":"Chat Metrics","sidebarTitle":"Metrics","href":"/concepts/chat/metrics"},{"title":"Storage Backends","href":"/concepts/chat/storage-backends"}]},{"group":"Advanced","pages":[{"title":"Context Manager","href":"/concepts/chat/advanced/context-manager"},{"title":"Error Handling","href":"/concepts/chat/advanced/error-handling"},{"title":"Memory Strategies","href":"/concepts/chat/advanced/memory-strategies"},{"title":"Multi-Session","href":"/concepts/chat/examples/multi-session"},{"title":"Persistent Storage","href":"/concepts/chat/examples/persistent-storage"},{"title":"User Profile","href":"/concepts/chat/examples/user-profile"}]}]},{"group":"StateGraph","icon":"diagram-project","pages":[{"title":"StateGraph","sidebarTitle":"Overview","href":"/concepts/stategraph/overview"},{"title":"Attributes","href":"/concepts/stategraph/attributes"},{"title":"Quick Start","href":"/concepts/stategraph/quickstart"},{"group":"Usage","pages":[{"title":"Core Concepts","href":"/concepts/stategraph/core-concepts"}]},{"group":"Advanced","pages":[{"title":"Advanced Features","href":"/concepts/stategraph/advanced/advanced-features"},{"title":"Building AI Agents","href":"/concepts/stategraph/advanced/building-agents"},{"title":"Human-in-the-Loop","href":"/concepts/stategraph/advanced/human-in-loop"},{"title":"Persistence \u0026 Time Travel","href":"/concepts/stategraph/advanced/persistence"},{"title":"Reliability \u0026 Resilience","href":"/concepts/stategraph/advanced/reliability"}]}]},{"group":"UEL","icon":"layer-group","pages":[{"title":"UEL (Upsonic Expression Language)","sidebarTitle":"Overview","href":"/concepts/uel/overview"},{"title":"Attributes","href":"/concepts/uel/attributes"},{"group":"Advanced","pages":[{"title":"Async Execution","href":"/concepts/uel/advanced/async-execution"},{"title":"Conditional Routing","href":"/concepts/uel/advanced/conditional-routing"},{"title":"Custom Chains","href":"/concepts/uel/advanced/custom-chains"},{"title":"Parallel Execution","href":"/concepts/uel/advanced/parallel-execution"},{"title":"RAG Patterns","href":"/concepts/uel/advanced/rag-patterns"},{"title":"Model Memory Modes","href":"/concepts/uel/advanced/memory-modes"},{"title":"Visualization","href":"/concepts/uel/advanced/visualization"}]}]},{"group":"Simulation","icon":"flask","pages":[{"title":"Simulation","sidebarTitle":"Overview","href":"/concepts/simulation/overview"},{"group":"Usage","pages":[{"title":"Merchant Revenue Forecast","href":"/concepts/simulation/scenarios/merchant_revenue_forecast"}]}]},{"group":"Evals","icon":"chart-line","pages":[{"title":"Evals","sidebarTitle":"Overview","href":"/concepts/evals/overview"},{"group":"Usage","pages":[{"group":"Reliability Evals","pages":[{"title":"Reliability Evaluation","sidebarTitle":"Overview","href":"/concepts/evals/usage/reliability/introduction"},{"title":"Reliability Evaluation with Agent","sidebarTitle":"Agent","href":"/concepts/evals/usage/reliability/agent"},{"title":"Reliability Evaluation with Team","sidebarTitle":"Team","href":"/concepts/evals/usage/reliability/team"},{"title":"Reliability Evaluation with Graph","sidebarTitle":"Graph","href":"/concepts/evals/usage/reliability/graph"}]},{"group":"Performance Evals","pages":[{"title":"Performance Evaluation","sidebarTitle":"Overview","href":"/concepts/evals/usage/performance/introduction"},{"title":"Performance Evaluation with Agent","sidebarTitle":"Agent","href":"/concepts/evals/usage/performance/agent"},{"title":"Performance Evaluation with Team","sidebarTitle":"Team","href":"/concepts/evals/usage/performance/team"},{"title":"Performance Evaluation with Graph","sidebarTitle":"Graph","href":"/concepts/evals/usage/performance/graph"}]},{"group":"Accuracy Evals","pages":[{"title":"Accuracy Evaluation","sidebarTitle":"Overview","href":"/concepts/evals/usage/accuracy/introduction"},{"title":"Accuracy Evaluation with Agent","sidebarTitle":"Agent","href":"/concepts/evals/usage/accuracy/agent"},{"title":"Accuracy Evaluation with Team","sidebarTitle":"Team","href":"/concepts/evals/usage/accuracy/team"},{"title":"Accuracy Evaluation with Graph","sidebarTitle":"Graph","href":"/concepts/evals/usage/accuracy/graph"}]}]}]},{"group":"Canvas","icon":"palette","pages":[{"title":"Canvas","href":"/concepts/canvas"}]},{"group":"Graph","icon":"sitemap","pages":[{"title":"Graph","href":"/concepts/graph"}]}]},{"group":"STARTING AN AGENT PROJECT","pages":[{"title":"Overview","href":"/CLI/overview"},{"title":"Initialization","href":"/CLI/initialization"},{"title":"Start Agent API","href":"/CLI/start-agent-api"}]},{"group":"READY TO USE SNIPPETS","pages":[{"title":"AGENTS.md","sidebarTitle":"AGENTS.md","href":"/ready-to-use-snippets/agents-md"},{"title":"BOOTSTRAP.md","href":"/ready-to-use-snippets/bootstrap"},{"title":"SKILL.md","sidebarTitle":"SKILL.md","href":"/ready-to-use-snippets/skill"},{"title":"SOUL.md","sidebarTitle":"SOUL.md","href":"/ready-to-use-snippets/soul-md"},{"title":"USER.md","sidebarTitle":"USER.md","href":"/ready-to-use-snippets/user-md"}]},{"group":"DEPLOYMENT","pages":[{"title":"Deployment Overview","sidebarTitle":"Overview","href":"/deployment/overview"},{"title":"Deploy via FastAPI","sidebarTitle":"FastAPI","href":"/deployment/fastapi"},{"title":"Deploy via Django","sidebarTitle":"Django","href":"/deployment/django"},{"title":"Debugging","href":"/concepts/debugging"}]},{"group":"FURTHER READINGS","pages":[{"title":"Telemetry","href":"/further-readings/telemetry"},{"title":"Comparison","href":"/further-readings/comparison"}]}]},{"tab":"AgentOS","pages":[{"title":"AgentOS","href":"/agentos/get-started/introduction"}]},{"tab":"Universal Commerce Protocol (UCP)","pages":[{"title":"Universal Commerce Protocol (UCP)","href":"/ucp"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/1-create-a-task"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/agent/agent"}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/examples/overview/introduction"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Community","pages":[{"title":"Community","href":"/community"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Getting Started - Upsonic AI","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":[],"chunks":[]}