Skip to content

docs: add AgentField to Agent SDKs integrations#22901

Merged
krrishdholakia merged 3 commits intoBerriAI:litellm_oss_staging_03_06_2026from
santoshkumarradha:add-agentfield-agent-sdk
Mar 6, 2026
Merged

docs: add AgentField to Agent SDKs integrations#22901
krrishdholakia merged 3 commits intoBerriAI:litellm_oss_staging_03_06_2026from
santoshkumarradha:add-agentfield-agent-sdk

Conversation

@santoshkumarradha
Copy link

Summary

Adds AgentField to the Agent SDKs section in the integrations docs.

AgentField is an open-source control plane for building and orchestrating autonomous AI agents. Its Python SDK uses LiteLLM internally (litellm.acompletion()) for multi-provider LLM support, giving agents access to 100+ providers out of the box.

Changes

  • Added AgentField entry to integrations/index.md under AI Agent Frameworks
  • Created tutorials/agentfield.md with usage examples (OpenAI, Anthropic, Ollama, Azure, LiteLLM Proxy)
  • Added tutorials/agentfield to the Agent SDKs sidebar section

Links

cc @AbirAbbas

@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Mar 5, 2026 1:17pm

Request Review

@CLAassistant
Copy link

CLAassistant commented Mar 5, 2026

CLA assistant check
All committers have signed the CLA.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 5, 2026

Greptile Summary

This is a documentation-only PR that adds AgentField — an open-source control plane for autonomous AI agents — to LiteLLM's integrations page and Agent SDKs sidebar. It introduces a new tutorial (tutorials/agentfield.md) covering usage with OpenAI, Anthropic, Ollama, Azure, and LiteLLM Proxy, registers the page in the integrations/index.md AI Agent Frameworks section, and adds the sidebar entry in sidebars.js.

  • The Quick Start code snippet uses await agent.run(...) at the module level without an enclosing async def function, which is a SyntaxError when executed as a Python script. It should wrap the call in an async def main() and use asyncio.run().
  • Tabs and TabItem are imported at the top of agentfield.md but are never referenced in the document body — these unused imports should be removed to avoid Docusaurus build warnings.
  • No changes to source code, tests, or existing functionality.

Confidence Score: 4/5

  • Documentation-only PR with no code changes; safe to merge after fixing the async code example.
  • All changes are confined to documentation files. The only concerns are a broken code snippet (top-level await) and unused JSX imports, both limited to the new tutorial page and with no impact on the LiteLLM library itself.
  • docs/my-website/docs/tutorials/agentfield.md — the Quick Start example needs an async wrapper and unused imports should be removed.

Important Files Changed

Filename Overview
docs/my-website/docs/tutorials/agentfield.md New tutorial for AgentField integration; contains a top-level await in the Quick Start snippet (SyntaxError in script context) and two unused JSX imports (Tabs, TabItem).
docs/my-website/docs/integrations/index.md Adds AgentField entry to the AI Agent Frameworks section and fixes missing newline at end of file. No issues found.
docs/my-website/sidebars.js Adds tutorials/agentfield as the first entry in the Agent SDKs sidebar category. No issues found.

Sequence Diagram

sequenceDiagram
    participant User
    participant AgentField SDK
    participant LiteLLM
    participant LLM Provider

    User->>AgentField SDK: agent.run("prompt")
    AgentField SDK->>LiteLLM: litellm.acompletion(model, messages)
    LiteLLM->>LLM Provider: API request (OpenAI / Anthropic / Azure / Ollama / …)
    LLM Provider-->>LiteLLM: LLM response
    LiteLLM-->>AgentField SDK: Normalised response
    AgentField SDK-->>User: Agent response
Loading

Last reviewed commit: 2881024

Comment on lines +34 to +45
```python
from agentfield import Agent, AgentConfig

config = AgentConfig(
name="my-agent",
model="gpt-4o", # Any LiteLLM-supported model
instructions="You are a helpful assistant."
)

agent = Agent(config)
response = await agent.run("Hello, world!")
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await used outside an async context

The snippet uses await agent.run(...) at the top level of a code block without wrapping it in an async def function. In Python, await expressions are only valid inside async def functions (or in an async REPL like IPython). Running this code as a plain .py script will raise a SyntaxError.

The example should either wrap the call in an async def main() function and use asyncio.run(), or show the synchronous variant if one exists.

Suggested change
```python
from agentfield import Agent, AgentConfig
config = AgentConfig(
name="my-agent",
model="gpt-4o", # Any LiteLLM-supported model
instructions="You are a helpful assistant."
)
agent = Agent(config)
response = await agent.run("Hello, world!")
```
import asyncio
from agentfield import Agent, AgentConfig
config = AgentConfig(
name="my-agent",
model="gpt-4o", # Any LiteLLM-supported model
instructions="You are a helpful assistant."
)
async def main():
agent = Agent(config)
response = await agent.run("Hello, world!")
asyncio.run(main())

Comment on lines +1 to +2
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused JSX imports

Tabs and TabItem are imported at the top of the file but are never used anywhere in the document. In Docusaurus this can produce build warnings. These two lines should be removed.

Suggested change
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

@krrishdholakia krrishdholakia changed the base branch from main to litellm_oss_staging_03_06_2026 March 6, 2026 04:43
@krrishdholakia krrishdholakia merged commit d92bb15 into BerriAI:litellm_oss_staging_03_06_2026 Mar 6, 2026
28 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants