How to use an agent?

Hi!

So I set up Archon on my machine successfully and used it to build an agent! Amazing stuff.

The output is

  • agent.py
  • README.md
  • requirements.txt

The readme mentions using agent.py as a sort of API to write Python code with… but is this the intention?

Seems to me like this agent Archon produced would be much more suited to being an MCP server that I could use in Windsurf and friends to actually build stuff with.

Am I missing something?

Guess my next step is grabbing the MCP Python SDK to try and turn this agent into an MCP server…

1 Like

There are a lot of possibilities with Archon but if your intention was not to use the created agent as an API then I would take a look at your prompt.

I have found a few times when I specify to use “Archon MCP server” in the prompt, the coder will occasionally try to build a new MCP server.

Tips that I have found work
Best case: Don’t mention Archon and see if your IDE/model use the tool
Better: “Use Archon to create…” at the beginning of the prompt
Not great: Mentioning Archon MCP in the middle or at the end of your prompt.

Feel free to post your prompt if you want to dive in further.

1 Like

Hey there

Honestly I’m still pretty confused on what agents are best used for.

I’ve been working on this thing for hours in Windsurf so I don’t remember my exact prompt but it was pretty close to this: “Use Archon to create an agent that writes CLI apps by using cobra-cli”

My intention was to have an agent that can help me leverage cobra-cli to build go-based CLI tools for anything I want.

I thought I would hook this agent up to Windsurf as an MCP server so I could steer the conversation from Windsurf’s Cascade but perhaps I was thinking about this all wrong…

I was basically trying to stuff an agent into an MCP server to make it available through further tooling like Windsurf or Cursor’s chat/agent interface.

Looking at ai.pydantic.dev all afternoon and also searching through it, I noticed that the string “mcp” does not appear in it once, strengthening my assumption that I’m thinking about this all wrong…

1 Like

Thanks for your suggestions @Mike_S! This aligns with what I’ve found works best for prompting AI IDEs to use Archon as well. And in future versions of Archon I could definitely make it so you have to be less specific just by improving the docstrings for the Archon MCP tools.

@ichoosetoaccept, glad you got Archon up and running smoothly and thanks for posting! I think we’d have to dive a bit more to see how I could make things click for you, but firstly AI agents are separate from MCP servers. That’s why you don’t see MCP in the Pydantic AI docs anywhere.

AI agents are programs that use LLMs to interact with an environment (through tools) to achieve goals on your behalf. MCP servers, on the other hand, are a way to give tools to an agent so it can take certain actions. See the difference there? Agents are at a higher level than MCP servers since these servers are really just tools.

The caveat to this is agents can invoke other agents as “subagents”, so you can have an MCP server as a “subagent” which is what Archon is in relation to Windsurf.

Let me know if that makes sense and if you have questions about your Cobra CLI implementation based on that too!