Skip to content

Codeligence Agents Server

Welcome to the Codeligence Agents Server! This guide is intended for software developers looking to build AI agents in a straightforward way, even if you’re not deeply familiar with Python. We’ll show you how to set up the development environment, create your first AI agent, and leverage the built-in frameworks - Pydantic AI or CrewAI - to power your agent’s reasoning and tool usage. Finally, we’ll illustrate how to integrate and test your agents in the Codeligence ecosystem.

Overview

Codeligence Agents Server is the back-end component that: 1. Receives chat requests (and chat history) from the Codeligence Platform (where the user is interacting through the Chat). 2. Routes those requests to the AI agents you create. 3. Collects the agent’s outputs (answers, status updates, citations, interactive buttons, etc.) and sends them back to the Chat over the Codeligence Platform.

Developers only need to focus on implementing their agent.py (and optionally an integration.py) to define how the AI agent processes user messages. The server handles everything else: hooking up the chat with bidirectional communication, providing environment variables, an execution scope and exposing your agents via an API.

So check out the sub pages to implement your first agent

Codeligence Utility Functions

You’ll see many codeligence_report_* helper functions. They let you send updates back to the Codeligence Platform so the user can see them in the chat interface.

  • codeligence_report_status(str)
    Sends a short status update, e.g., “Querying Database…”
  • codeligence_report_task_output(taskName: str, output: str)
    Sends a named chunk of text. For example, ("Intermediate Result", "The user has 3 pending orders").
  • codeligence_report_citations([Citation(name, source)])
    Lists sources or references for your responses.
  • codeligence_report_buttons([Button(id, text, input_required)])
    Adds interactive buttons in the user’s chat, e.g. “Continue” or “Retry.” If input_required is not None, the user must fill in an extra text field before the button press is complete.

Inside your agent’s run function, you can call these methods any number of times. The user will see them appear in real time.

Further Reading

  • README.md in the repository for quick instructions and typical usage patterns.
  • PROMPT_CODE.md for in-depth agent creation examples using Pydantic AI (function calling, dynamic system prompts, structured outputs, and reflection) that you can use as a system prompt to headstart your agent development.

Conclusion

That’s it! You now have all the pieces to set up your environment, create a new agent, and integrate with the Codeligence Agents Server. Whether you use Pydantic AI or CrewAI, the flow is the same: define your agent.py with a run method that processes the user’s message and calls helper functions/tools as necessary, then report your results back to the user using the codeligence_report_* utilities.

Happy coding, and welcome to the Codeligence ecosystem! If you have questions, check out the example agents in the repository, consult the PROMPT_CODE.md, or ask the developer community for guidance.