Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPIC - Python feature parity with Typescript #294

Open
mmurad2 opened this issue Jan 27, 2025 · 6 comments
Open

EPIC - Python feature parity with Typescript #294

mmurad2 opened this issue Jan 27, 2025 · 6 comments
Assignees

Comments

@mmurad2
Copy link
Member

mmurad2 commented Jan 27, 2025

Description

This Epic focuses on achieving feature and functionality parity between our Python framework and the existing TypeScript framework. This Epic is primarily for developers working with the Python version of the BeeAI framework, ensuring they have the same tools and capabilities as TypeScript users.

Initiative / goal

This Epic supports the larger initiative of increasing adoption of the Python version of framework.

Hypothesis

Most impactful features to prioritize:

  • CLI getting started experience
  • Agents (+ examples)
  • Workflows (+ examples)
  • LLMs: ollama, watsonx, groq, openAI (rest can follow later)
  • Templates
  • Memory
  • Tools: Code interpreter, custom tool, integrations with Langchain and MCP?
  • Observability (dependency [add epic])

Acceptance criteria and must have scope

TBD

Stakeholders

Granite Bee (in python): @grahamwhiteuk @michael-desmond
Testing / feedback on dev experience: @ismaelfaro

Timeline

Goal is to complete full feature parity by end of Feb.
Most critical features to be shipped ahead by Feb 10 -- @grahamwhiteuk @michael-desmond to provide requirements.

@mmurad2
Copy link
Member Author

mmurad2 commented Jan 27, 2025

@michael-desmond @grahamwhiteuk I am assigning you the ticket while it is still in planning so you can share the features you need prioritized in python to meet the Feb 12 deadline.

@vabarbosa
Copy link
Contributor

vabarbosa commented Jan 28, 2025

also adding @ajbozarth as he will be assisting me with some of this work

@michael-desmond
Copy link
Contributor

michael-desmond commented Jan 28, 2025

For the Feb 12 deadline my take is that the follwing features should be prioritized:

  • Ollama + json structured outputs (OllamaChatLLM and JsonDriver in .ts world)
  • Workflows
  • Memory, Message primitives etc.

The reasoning here is that we want hackathon participants to be able to create interesting agents with minimal setup complexity. Ollama gives us an easy way to access granite 3.1, no need for cloud credentials etc. Workflows allow the definition of complex agents and multi-agent systems. The ollama structured output (json) is necessary as it allows you to produce tool parameters, and then you can just call the tool yourself. So participants could just use the langchain tools in the meantime.

@michael-desmond
Copy link
Contributor

michael-desmond commented Jan 28, 2025

Example of calling a tool directly. We could provide examples of this pattern to get people familiar. ETA this is a workflow step i.e. a node in an agent graph.

.addStep("search", async (state) => {
  
  const driver = new JsonDriver(getChatLLM());
  const { parsed } = await driver.generate(
    z.object({
      search_query: z.string(),
    }),
    [
      BaseMessage.of({
        role: Role.SYSTEM,
        text: `You are an expert at creating web search queries.`,
      }),
      BaseMessage.of({
        role: Role.USER,
        text: SEARCH_QUERY_PROMPT.render({ task: state.input }),
      }),
    ],
  );

  const searchResults: SearxngToolOutput = await new SearxngTool().run({
    query: parsed.search_query,
  });

  return { update: { results: searchResults }, next: "synthesize" };
})

@Tomas2D
Copy link
Contributor

Tomas2D commented Jan 28, 2025

@michael-desmond drivers are going to be dropped, see #298.
However, native tool calling will be available, and the provider's structured output will be available (which is more reliable).

@michael-desmond
Copy link
Contributor

Thanks, structured output is the key feature.

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

No branches or pull requests

6 participants