Skip to main content

Connection

Before you can use an agent, you need a connection to an LLM provider. The connection contains the provider, the model and the credentials. Internally, Fusio uses the Symfony AI platform bridges to communicate with the provider.

Supported providers​

ProviderDescriptionCredentials
ChatGPTThe models of OpenAIAPI key
AnthropicThe Claude models of AnthropicAPI key
GeminiThe models of Google GeminiAPI key
OllamaSelf-hosted open source models through OllamaURL of your Ollama host

With Ollama you can run an LLM on your own infrastructure, so that no data leaves your servers.

Create a connection​

Go to API / Connection, click on create and select the Agent connection class. Then fill in the following fields:

FieldDescription
NameThe name of the connection, i.e. OpenAI
TypeThe provider: ChatGPT, Anthropic, Gemini or Ollama
ModelThe name of the model of the provider, please take a look at the documentation of your provider for available models
API-KeyThe API key of your provider account
UrlOnly for Ollama, the URL of your Ollama host, i.e. http://localhost:11434

When you save the connection, Fusio sends a short test message to the LLM to check whether the connection works.

tip

When you create your first agent connection, Fusio automatically assigns it to the built-in agents, so you can start using them directly.

Choosing a model​

The model has a big influence on the quality, speed and costs of your agents:

  • For the built-in agents which generate code, schemas or database tables, use a capable model which supports tool calling, since these agents call many tools to inspect your Fusio instance
  • For agents which return structured output, make sure the model supports structured output, otherwise the response might not match your schema
  • For simple agents, i.e. a FAQ assistant, a smaller and faster model is often sufficient and reduces your costs

You can create multiple connections, i.e. one per model, and select the fitting connection at each agent.

Usage in actions​

An agent connection can also be used inside an action. In this case the connection returns a Symfony\AI\Agent\AgentInterface instance, s. Agent connection.