Skip to main content
An AI agent can do more than chat. You can extend it with custom actions, external services, and a knowledge base so it can call APIs, query databases, or fetch facts and include the results in its replies. There are three ways to extend an agent, and they work well together:
  • Function Tools run your own code.
  • MCP connects standardized external tool servers.
  • RAG grounds answers in your own documents.

Ways to Extend an Agent

Function Tools

Functions your agent calls to run custom logic, call APIs, or access state.

MCP

Attach Model Context Protocol servers to extend your agent with external tools.

RAG

Ground agent answers in a knowledge base with custom retrieval..

What’s Next

Function Tools

Add custom actions to your agent.

Creating an Agent

Register the tools on an agent you define.

Run Your Agent

Run the tool-equipped agent in a live session.

References

Examples

Tool Chaining

Chain multiple function tools in one turn.

MCP Integration

Connect tools through an MCP server.

SDK Reference

MCP

MCP in the Python API reference.