Skip to content

Conversation

@gojkoc54
Copy link

@gojkoc54 gojkoc54 commented Dec 5, 2025

This PR adds AgentSpecAgentAdapter that lets CrewAI import agents defined using Oracle's AgentSpec specification language. (https://github.com/oracle/agent-spec.git)

Supported features:

  • ReAct-style agents
  • Tools

Not currently supported (in the works):

  • Flows
  • Multi-agent patterns

Please refer to this PR in the crewai-examples repo for a detailed demo on how the AgentSpec adapter could be used to bring a LangGraph agent into CrewAI.


Note

Introduce AgentSpecAgentAdapter to load Oracle AgentSpec agents into CrewAI and update docs with an example integrating it alongside LangGraph and OpenAI adapters.

  • Core (adapters):

    • Add crewai/agents/agent_adapters/agentspec/agentspec_adapter.py implementing AgentSpecAgentAdapter that wraps AgentSpec-loaded agents and delegates execution/tooling to the converted crewai.Agent.
    • Add package file crewai/agents/agent_adapters/agentspec/__init__.py.
  • Docs:

    • Include AgentSpec in “Out of the Box Adapters” with brief description and link.
    • Update “Bring your own agent” guide example to:
      • Use AgentSpecAgentAdapter with pyagentspec serializer/config.
      • Adjust imports (from crewai import Agent, Crew, Task).
      • Add/restructure tasks: task_write_code, task_review_code, task_find_links, task_generate_report and include the new reviewer agent in Crew.
      • Minor LangGraph adapter import consolidation and example result handling.

Written by Cursor Bugbot for commit e38b7c6. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 28

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

from src.crewai import Agent, Crew, Task
from crewai import Agent, Crew, Task
from langchain_openai import ChatOpenAI
from pyagentspec.agent import Agent
Copy link

Choose a reason for hiding this comment

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

Bug: Import shadowing causes wrong Agent class usage

The import from pyagentspec.agent import Agent on line 338 shadows the earlier import from crewai import Agent on line 336. When code_helper_agent = Agent(...) is created on line 348 with role, goal, and backstory parameters, it will incorrectly use pyagentspec.agent.Agent instead of crewai.Agent. The pyagentspec Agent class likely doesn't accept these parameters, causing a runtime error. The pyagentspec Agent import needs an alias like AgentSpecAgent.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

1 participant