Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

thisisfixer/aci-agents

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI agents built with ACI.dev along with many examples of how to use ACI.dev withdifferent LLMs and agent frameworks such as langchain, CrewAI, Llama Index, etc.

Patterns

There are2 main patterns for building agents with Aipolabs ACI, regardless of the LLM or framework used.
The second pattern includes2 sub-patterns based on how tools are discovered and used.

1. Agent with Pre-planned Tools (Static Tools)

2. Agent with Dynamic Tool Discovery and Execution

2.1 Tool List Expansion Approach

With this approach, you:

  • UseACI_SEARCH_FUNCTIONS meta function (tool):
  • Search for relevant functions across all apps
  • Add discovered tools directly to the LLM's tool list
  • Allow the LLM to invoke these discovered tools directly by name

Key implementation points:

  • Maintain atools_retrieved list that dynamically adds/removes tools as they are discovered or abandoned
  • WhenACI_SEARCH_FUNCTIONS returns functions (tools), add to this list
  • Pass bothACI_SEARCH_FUNCTIONS and discovered functions (tools) to the LLM in each request
  • The LLM can use the discovered tools for future tool callsdirectly (e.g.,BRAVE_SEARCH__WEB_SEARCH)

2.2 Tool Definition as Text Context Approach (Less Reliable)

With this approach, you:

  • UseACI_SEARCH_FUNCTIONS andACI_EXECUTE_FUNCTION meta functions (tools)
  • UseACI_SEARCH_FUNCTIONS to retrieve tool definitions
  • Present those definitions to the LLM astext content instead of adding them to the LLM's tool list
  • The LLM usesACI_EXECUTE_FUNCTION to execute these toolsindirectly
  • Note: This approach has lower function calling accuracy compared to the Tool List Expansion Approach due to the tools attached as text content instead of being added to the LLM's tool list

Key implementation points:

  • Only include meta functions (tools) in the LLM's tool list
  • Share tool definitions as chat content
  • The LLM reads the tool definition to generate appropriate arguments
  • The LLM callsACI_EXECUTE_FUNCTION with the tool name and arguments

🔁Execution Flow Comparison

PatternApproachFlow
1Pre-planned toolsDefine Tools in tools list → Direct Tool Call
2.1Tool List ExpansionSearch → Get Tool Definition → Add to Tools → Direct Tool Call
2.2Text Context ExecutionSearch → Get Tool Definition → Add to Text Context → Call via Meta Function

Running the examples

The examples are runnable, for a quick setup:

  • Clone the whole repository and install dependenciesuv sync
  • Set your OpenAI API key and/or Anthropic API key (set asOPENAI_API_KEY and/orANTHROPIC_API_KEY in your environment). See.env.example.
  • Set your Aipolabs ACI API key (set asACI_API_KEY in your environment)
  • Configure the app the example uses (e.gBRAVE_SEARCH) in theAipolabs ACI platform
  • Allow the Apps (e.g.,BRAVE_SEARCH) to be used by youragent in theAipolabs ACI platform
  • Link an account for the app you use on theAipolabs ACI platform. If the app requires an API key (e.g.BRAVE_SEARCH) then you need to get the api key from that app (e.g.brave). If the app use OAuth2 (e.g.GITHUB), you need to complete the OAuth2 flow onthe ACI.dev platform when linking your account.
  • Set theLINKED_ACCOUNT_OWNER_ID environment variable to your owner id of the linked account you just created.
  • Run any example:uv run python examples/agent_with_pre_planned_tools.py
  • You might need to repeat the above steps for other examples if they use different apps.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp